Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Hyperlink in Commandbutton

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Hyperlink in Commandbutton

The 2 combobox selections will determine which part of the sheet I go to.
I'm not sure what you mean on your example.

"Dave Peterson" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Hyperlink in Commandbutton

I was showing you how you could select a range using VBA code rather than using
a hyperlink.

If that doesn't make sense, maybe you should expand on what the values would be
in the comboboxes.

bgkgmg wrote:

The 2 combobox selections will determine which part of the sheet I go to.
I'm not sure what you mean on your example.

"Dave Peterson" wrote:

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


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Hyperlink in Commandbutton

I have sheet1 populated with 12 ledgers (Jan, Feb, Mar, etc.). Jan range is
BB101:BP141 Feb range is BB201:BP241 Mar range is BB301:BP341 etc. I am
trying to create a Userform to be used like a table of contents that
freefloats on sheet. On Userform there are 2 comboboxes - 1 that identifies
the month and the other a range within that month. I wanted to click the
Button(ENTER) and jump to selected month and range. Hope I explained
properly and thanks for your time.

Thanks

"Dave Peterson" wrote:

I was showing you how you could select a range using VBA code rather than using
a hyperlink.

If that doesn't make sense, maybe you should expand on what the values would be
in the comboboxes.

bgkgmg wrote:

The 2 combobox selections will determine which part of the sheet I go to.
I'm not sure what you mean on your example.

"Dave Peterson" wrote:

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


--

Dave Peterson



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyperlink using commandbutton? Bob Excel Discussion (Misc queries) 2 May 29th 09 12:54 PM
Assigning a Hyperlink to a CommandButton Andy T Excel Discussion (Misc queries) 2 December 21st 04 12:31 PM
CommandButton chris[_12_] Excel Programming 1 April 15th 04 01:01 AM
CommandButton rwebster3 Excel Programming 0 April 14th 04 08:16 PM
Commandbutton David Fixemer Excel Programming 2 February 25th 04 10:18 PM


All times are GMT +1. The time now is 06:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"