Hi there,
I got 6 worksheet and I a few userform.
I tried to do this code:
Sub DefineWorkSheet()
Dim WS1 As Worksheet
Dim WS2 As Worksheet
Dim WS3 As Worksheet
Dim WS4 As Worksheet
Dim WS5 As Worksheet
Dim WS6 As Worksheet
Set WS1 = Worksheets("MonthSummary")
Set WS2 = Worksheets("WeekSummary")
Set WS3 = Worksheets("DatabaseForm")
Set WS4 = Worksheets("DatabasePO")
Set WS5 = Worksheets("Setup")
Set WS6 = Worksheets("Products")
End Sub
And I call it in every userform header
However I got object error issue.
Is it my method and approach wrong? I need this function to be working so every userform I only need to call the function instead of repeating the same code
On the other hand if there is changes, I only change the function name instead of changing at every form.
Any idea?
Thank you.
Bookmarks