vvSTRIDEvv
Board Regular
- Joined
- Jun 17, 2010
- Messages
- 74
I have a form to enter in some employee information.
Column A of the database is the employee's name, but there are 10 row gaps between each name, like..
Employee Name
John Doe
Jane Doe
The list goes all the way down the worksheet through 100's of employees.
Here is where I get an object not defined error
I sure help someone could help with this.
Thanks
Column A of the database is the employee's name, but there are 10 row gaps between each name, like..
Employee Name
John Doe
Jane Doe
The list goes all the way down the worksheet through 100's of employees.
Code:
Private Sub CommandUpdate_Click()
Dim irow As Long
Dim ws As Worksheet
Set ws = Worksheets("manager")
'Find Employee name in column A, and enter data to the immediate empty row below
irow = ws.Columns("a:a").Find(Me.listemployee.Value) _
.End(xlUp).Offset(1, 0).Row
'Enter information from the form to the correct area of the worksheet based on the found employee name
ws.Cells(irow, 1).Value = Me.listemployee.Value
ws.Cells(irow, 2).Value = Me.Calendar1.Value
ws.Cells(irow, 3).Value = Me.Combo_instance.Value
ws.Cells(irow, 9).Value = Me.txtnotes.Value
Here is where I get an object not defined error
Code:
irow = ws.Columns("a:a").Find(Me.listemployee.Value) _
.End(xlUp).Offset(1, 0).Row
I sure help someone could help with this.
Thanks