Thread: Do Loop
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Do Loop

Private Sub CommandButton1_Click()
dim r as Long
r = 1
Do while Not isempty(cells(r,1))
r = r + 1
Loop
Cells(r,1) = Textbox1.Text
Cells(r,2) = Textbox2.Text

End Sub

--
Regards,
Tom Ogilvy


"BobBarker" wrote in message
...
I need help with the following VB Excel Do Loop Statement in a user form:
In lame men terms

Private Sub CommandButton1_Click()
Range = Row
Do while 'the cell in row 1 is empty

If 'the cell is empty then
Select the cell and drop Text Box1 information (From A User form) in to

the
empty cell
(Like "A10" ) and Text Box2 Information into the cell next to it. (Like
"B10").
Else

Row +1

Loop

End if
End if

End Sub

Thank you very much for any Feedback. Please Also include, If okay, a

E-Mail
Address for possible further