macro to input data

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
 
M

merjet

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top