I made a user form to enter the data but I cannot get the data to copy to the worksheet.
The worksheet is named "WOODS" and the data should be entered in the first available blank row, starting with column "B".
Here is he code I tried but as of yet when I try to run the code nothing happens.
Private Sub ComandButton1_Click()
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("WOODS")
'switch off ScreenUpdating to speed up code & prevent flickering
Application.ScreenUpdating = False
'find first empty row in database
iRow = ws.Cells(Rows.Count, 2).End(xlUp).Offset(1, 0).Row
'copy the data to the database
ws.Cells(iRow, 2).Value = Me.TextBox1.Value
ws.Cells(iRow, 3).Value = Me.TextBox2.Value
ws.Cells(iRow, 4).Value = Me.TextBox3.Value
ws.Cells(iRow, 5).Value = Me.TextBox4.Value
End If
End Sub
Any help would be wonderful.
Jim O
Bookmarks