Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22
Default Go To Button on a spreadsheet.

I have the following code that i cannot get to work. In escence i
just
want to click on the button and go to the worksheet named in the
combobox. If i take the combobox away and just type a name into a
cell
say A4 it works fine. Obviously i am not referencing the Combobox
properly.

Private Sub CommandButton1_Click()
Worksheets(Range("ComboBox1").Value).Activate


End Sub


With thanks


Bob
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Go To Button on a spreadsheet.

Try this

Private Sub ComboBox1_Change()
Sheets(ComboBox1.Text).Select
End Sub

Mike

"Bob" wrote:

I have the following code that i cannot get to work. In escence i
just
want to click on the button and go to the worksheet named in the
combobox. If i take the combobox away and just type a name into a
cell
say A4 it works fine. Obviously i am not referencing the Combobox
properly.

Private Sub CommandButton1_Click()
Worksheets(Range("ComboBox1").Value).Activate


End Sub


With thanks


Bob

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
How do I create a button on a spreadsheet ? Lynn Excel Worksheet Functions 2 June 4th 08 10:23 PM
Reset button in my spreadsheet GT Excel Discussion (Misc queries) 3 August 8th 07 01:18 PM
Can you add a button to a spreadsheet to Print? Pam Dupre Excel Discussion (Misc queries) 1 November 7th 06 07:24 PM
Button to email my spreadsheet hays4 Excel Discussion (Misc queries) 2 November 4th 05 12:57 PM
Adding a button to a spreadsheet... PokerZan Excel Discussion (Misc queries) 4 July 22nd 05 12:50 AM


All times are GMT +1. The time now is 07:26 PM.

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

About Us

"It's about Microsoft Excel"