Question Locked

How to use a command button and hyperlink to sheet

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi I am trying, not very successfully use commend buttons to hyperlink to other sheets within the same workbook.

I have created the buttons and they work in design mode but when I exit the control box design mode they no longer work.

Any ideas??? I am using Excel 2002

Thanks Julian

2 replies

by kenneth.johnson9

All that you need to do is to make the button code look like this:
---------------------------------------------
Private Sub CommandButton1_Click()
Worksheets("Sheet2").Activate
End Sub
---------------------------------------------
Assumptions:
1) your second sheet tab is "Sheet2"
2) your button id name is "CommandButton1"

Hope this helps... let me know.

This discussion is closed to new replies.