0

I've got this line of code

 Set search_MachineID = Worksheets(sheet_name).Activate.Find("Machine Serial Number:", Lookat:=xlPart)

and when I run my code I get the following message Run-Time error '424': object required.

What am I doing wrong? Is this happening because the text that I'm searching doesn't exist on this sheet?

Sam
  • 332
  • 1
  • 9
  • 3
    No, it's because [`Activate`](https://docs.microsoft.com/en-us/office/vba/api/excel.worksheet.activate(method)) (which you [don't need](https://stackoverflow.com/q/10714251/11683)) is a sub and doesn't return anything. – GSerg Feb 28 '22 at 16:12

0 Answers0