macro to input data

  • Thread starter Thread starter glenn
  • Start date Start date
G

glenn

Hi
I need to know if what command is required to a make macro
that will ask the user to input data and then after
entering it will move to the next cell again asking the
user to input another data.

Glenn
 
Assuming entry is prompted by a
CommandButton:

Private Sub CommandButton1_Click()
Dim strIn As String
Do
strIn = InputBox("Enter data.")
iRow = iRow + 1
Sheets("Sheet1").Cells(iRow, 1) = strIn
Loop Until strIn = ""
End Sub

HTH,
Merjet
 
Back
Top