Command Button Hyperlink

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a command button (CommandButton1) on 'Sheet1' of an Excel spreadsheet.
I would like to be able to click on the command button and have it take me to
'Sheet2!A1'. What is the code that is entered into the module?
 
hi,
Sub macGoTo()
Sheets("sheet2").Activate
Range("A1").Select
End Sub

But why not just click the tab?????

Regards
FSt1
 
Thanks for your help. And yes, I could just click on the sheet tab, and I
could also use text in a cell as the hyperlink (which makes it very easy),
but it is an Excel feature that I wanted to learn how to do, and I also have
to create a spreadsheet for users that has hidden sheet tabs and is a
protected document to prevent users from changing the layout.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top