VBA: Search column A for next cell that's empty, then put data.
Posted by Ron M on January 24, 2002 12:24 PM
Not new to VB but New to VBA. I am using standard worksheet, and I use columns A thru L.
I have created a user form with 12 textboxes and 2 command buttons, Enter and Close. With the user form I can enter the data into each textbox, press " Enter", and it places the data in a row. Easy as pie. The test code that I use is this:
Private Sub cmdEnter_Click()
Range("A1").Select
ActiveCell.FormulaR1C1 = txtName
Range("B1").Select
ActiveCell.FormulaR1C1 = txtNumber
Range("C1").Select
ActiveCell.FormulaR1C1 = txtOldLe
'keeps going on to Range("L1")
End Sub
What I need to do next is find the next cell in column "A?", that is empty, to enter new data using the form. I know there is a way, and when I see it I'm going to be like, (Duh!). Just can't seem to think. Thanks Ron M.