acertco03dis
06-16-2016, 06:35 AM
Hello,
When I try to run the following piece of code, I am getting a run time error saying the object variable was not defined. I know for a fact that the value in A32 matches something on Sheet1, yet I am still getting the error saying that nothing was found. Any ideas? Thanks.
Dim EmployeeName As String
Worksheets("Admin").Activate
Range("A32").Select
EmployeeName = ActiveCell.Value
Worksheets("Sheet1").Activate
Range("A8", "A1000").Find(EmployeeName).Select
When I try to run the following piece of code, I am getting a run time error saying the object variable was not defined. I know for a fact that the value in A32 matches something on Sheet1, yet I am still getting the error saying that nothing was found. Any ideas? Thanks.
Dim EmployeeName As String
Worksheets("Admin").Activate
Range("A32").Select
EmployeeName = ActiveCell.Value
Worksheets("Sheet1").Activate
Range("A8", "A1000").Find(EmployeeName).Select