.
Please be specific which line is highlighted when you receive the error message. Otherwise, it will be searching for a pin in the proverbial haystack.
Having said that, the last line raises an eyebrow
Wonder if it shouldn't be
Code:
Sheets("Sheet1").Activate
Sheets("Sheet1").Range("A1").Select
Also, if the UserForm is still displayed, you will need to set it's PROPERTIES setting
to SHOW MODAL = False