go to worksheet on button name

N

Northern Dave

I am trying to assign a macro to a button so that when clicked it opens the
worksheet whose name is on the button
 
S

Stefi

Copy this event sub in the code window of worksheet containing the button:

Private Sub CommandButton1_Click()
Worksheets(Me.CommandButton1.Caption).Select
End Sub

Regards,
Stefi

„Northern Dave†ezt írta:
 
Top