Hi,
I have the below code which currently populates the next empty row with information from my userform. However this code only works if Column A is empty, unfortunately I will always have data in column A is there a way to change the code so it looks for the next empty row in Column B?
This is an (Extract of my code)
Private Sub BtnBookAppt_Click()
Dim erow As Long
erow = Sheet2.Cells(Rows.Count, 1).End(xlUp).Offset(1).Row
Sheet2.Cells(erow, 2).Value = Me.tbxName.Value
Sheet2.Cells(erow, 3).Value = UserForm2.tbxTown.Value
Sheet2.Cells(erow, 4).Value = UserForm2.TbxCounty.Value
Sheet2.Cells(erow, 6).Value = UserForm2.tbxPostCode.Value
Sheet2.Cells(erow, 7).Value = UserForm2.tbxEmail.Value
Sheet2.Cells(erow, 8).Value = UserForm2.tbxContact1.Value
Sheet2.Cells(erow, 9).Value = UserForm2.tbxContact2.Value
Sheet2.Cells(erow, 11).Value = UserForm2.CboPriority.Value
Sheet2.Cells(erow, 12).Value = UserForm2.tbxApptDate.Value
Sheet2.Cells(erow, 14).Value = UserForm2.tbxComments.Value
Unload UserForm2
UserForm2.Show
End Sub
Many thanks
Michelle
Bookmarks