dilligas2u
New Member
- Joined
- Mar 5, 2018
- Messages
- 7
Trying to find out what I need to change to get a userform to look at column B for empty row and not column A
I want to number column A this is the code I have now it finds the empty row in A
I want to number column A this is the code I have now it finds the empty row in A
Code:
rivate Sub CommandButton1_Click()
Dim emptyRow As Long
'Make Main Sheet Active
Sheet1.Activate
'Determine emptyRow
emptyRow = WorksheetFunction.CountA(Range("A:A")) + 1
'Transfer information
Cells(emptyRow, 2).Value = TextBox1.Value
Cells(emptyRow, 3).Value = TextBox2.Value
Cells(emptyRow, 4).Value = TextBox3.Value
Cells(emptyRow, 5).Value = TextBox4.Value
Cells(emptyRow, 6).Value = ComboBox1.Value
Cells(emptyRow, 7).Value = ListBox1.Value
Cells(emptyRow, 8).Value = ComboBox2.Value
End Sub
[endcode]
I know it has to be something simple but am at a loss.