ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Command Button (https://www.excelbanter.com/excel-discussion-misc-queries/182504-command-button.html)

Paul

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.

JP[_4_]

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.




All times are GMT +1. The time now is 01:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com