View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Hyperlink in Commandbutton

You could just have the Commandbutton1_click (or whatever its name is) select
the range you want.

Option Explicit
Private Sub CommandButton1_Click()
Application.Goto Me.Range("a1"), Scroll:=True
End Sub


Me refers to the object that owns the code. In this case, it's the worksheet
that the commandbutton is on.

bgkgmg wrote:

I have created a Userform with 2 Comboboxes and 1 Commandbutton(Enter) which
will appear on Sheet1 when called. When the 2 Combobox selections are made I
would like to click Commandbutton(Enter) which (acting like a hyperlink) move
me to desired place on sheet. Do I put a hyperlink code in
Commandbutton(Enter) or is their another way. I am having hard time coming
up with code for hyperlink that works on my Commandbutton(Enter) on the
Userform.

Thanks


--

Dave Peterson