I feel as though this is a simple fix, but for some reason it is stumping me. I created a UserForm in VBA. I want the user to continually type data into the UserForm and hit the "Add" button after every entry and it automatically display on the worksheet row after row with no blank rows in-between. My merged column headings take up rows 1 and 2, so the entered information from the UserForm must start on row 3, then go on row 4, then row 5, and so on. From the code below my entered information skips a row so that the first line doesn't get placed in the merged column heading rows (rows 1 and 2). Is there an easy solution here? Thanks for any help in advance.
'V
Private Sub AddBtn_Click()
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Room Schedules")
nr = ws.Cells(Rows.Count, 1).End(xlUp).Row + 2 <--(I know I can't do Row + 1 because this is when the entered data goes in the column headings)
ws.Cells(nr, 1) = CourseTBox.Value
ws.Cells(nr, 2) = RoomLBox.Value
ws.Cells(nr, 3) = StartTimeTBox.Value
ws.Cells(nr, 4) = EndTimeTBox.Value
Call ClearFormBtn_Click
End Sub
'V
Private Sub AddBtn_Click()
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Room Schedules")
nr = ws.Cells(Rows.Count, 1).End(xlUp).Row + 2 <--(I know I can't do Row + 1 because this is when the entered data goes in the column headings)
ws.Cells(nr, 1) = CourseTBox.Value
ws.Cells(nr, 2) = RoomLBox.Value
ws.Cells(nr, 3) = StartTimeTBox.Value
ws.Cells(nr, 4) = EndTimeTBox.Value
Call ClearFormBtn_Click
End Sub