1 | initial version |
You can use the "Activate" method with the variable that holds the initial sheet. For example:
Dim initialSheet as Worksheet
Set initialSheet = ThisWorkbook.Sheets("Sheet1") 'replace "Sheet1" with the name of your initial sheet
'code to open userform and do something
initialSheet.Activate 'activate initial sheet
This will activate the sheet that was assigned to the "initialSheet" variable.