Originally Posted by
Edmond
Indeed, it perfectly works.
So how would you proceed to let the user decide which Sub he wants to run?
Not nearly enough information, but I'm GUESSING that you mean the user runs Test() and then decides if it Call_Test or Call_Test2???
I'd architect it like this and let the user run Call_Test or Call_Test2
Option Explicit
Public ws As Worksheet, ws2 As Worksheet
Sub Call_Test()
Init
Debug.Print ws.Name
End Sub
Sub Call_Test2()
Init
Debug.Print ws2.Name
End Sub
Private Sub Init()
Set ws = ActiveWorkbook.Worksheets("Sheet1")
Set ws2 = ActiveWorkbook.Worksheets("Sheet2")
End Sub
If that's not close, then some more information would be helpful