#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Command Button

What is the VB to open a sheet when a command button is clicked.

I know this is very basic stuff for a lot of you and I do very much
appreciate the help.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 897
Default Command Button

Do you mean to select a sheet, or open a new workbook?

Try something like

Private Sub CommandButton1_Click()
Worksheets("mySheet").Activate
End Sub

or

Private Sub CommandButton1_Click()
Workbooks("C:\mybook.xls").Open
End Sub


HTH,
JP


On Apr 4, 5:34*am, Paul wrote:
What is the VB to open a sheet when a command button is clicked.

I know this is very basic stuff for a lot of you and I do very much
appreciate the help.


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
Command button Richard Excel Worksheet Functions 3 March 12th 08 02:48 AM
Command Button Help Kenny Excel Discussion (Misc queries) 2 October 15th 07 03:29 AM
command button Zygan Excel Discussion (Misc queries) 0 June 30th 06 01:59 AM
command button abfabrob Excel Discussion (Misc queries) 5 October 7th 05 12:54 AM
command button Mike New Users to Excel 1 August 30th 05 01:39 AM


All times are GMT +1. The time now is 01:50 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"