Button to take the user in a different place on the same sheet

  • Thread starter Johanna Gronlund
  • Start date
J

Johanna Gronlund

Hello,

I have a command button (Button 4585). I would like it to take the user to
another place (cells A147:A180) on the same sheet (Sheet 10). Is this
possible? I cannot just use a hyperlink on a cell as the button only becomes
visible if the user makes certain choices.

Thanks very much in advance.

Johanna
 
J

Jason Falzon

Try attaching this macro

Sub Button4585_Click()

Sheets("Sheet10").Activate
'Range("A147").Select 'this will go to A147
Range("A147:A180").Select 'this will HIGHLIGHT range

End Sub


Choose one of the Range() lines only remove ' from Range("A147").select if
want to use that

Jason
 
J

Jason Falzon

Also in your case use


Sheets("Sheet 10").Activate

and not Sheet10 as your sheet name has a space.


Jason
 
G

Gord Dibben

First give the range a name.

Insert>Name>Define myrng

Private Sub CommandButton1_Click()
Application.Goto Reference:="myrng"
End Sub


Gord Dibben MS Excel MVP
 

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

Top