Hi,
What is the best way set up the sheets when working with forms?
I don't like to set up the sheets all the time..there must be an easier way right?
Private Sub UserForm_Initialize()
Dim TheSheet_A as Worksheet
Set TheSheet_A= Sheets("_A")
Dim TheSheet_B As Worksheet
Set TheSheet_B = Sheets("B")
Dim TheSheet_C As Worksheet
Set TheSheet_C = Sheets("C")
End Sub
Private Sub UserForm_Initialize()
Call needWorkSheets(TheSheet_A)
or
Call setupTheWorkSheets
End Sub
Private Function needWorkSheets(ws) as String
with ws
End with
End Function
Private Function setupTheWorkSheets ()
Dim TheSheet_A as Worksheet
Set TheSheet_A= Sheets("_A")
Dim TheSheet_B As Worksheet
Set TheSheet_B = Sheets("B")
Dim TheSheet_C As Worksheet
Set TheSheet_C = Sheets("C")
End Function
Bookmarks