![]() |
open sheet on workbook open
How do I set a macro to open a specific sheet each time the XL file is
opened? Thanks -- Stu |
open sheet on workbook open
Private Sub Workbook_open()
Sheet(whichever).activate End Sub "Stu" wrote in message ... How do I set a macro to open a specific sheet each time the XL file is opened? Thanks -- Stu |
open sheet on workbook open
go in the the workbook sheet and pick
Private Sub Workbook_Open() end sub in side this procudure write what you want the workbook to do when it is opened Jase -----Original Message----- How do I set a macro to open a specific sheet each time the XL file is opened? Thanks -- Stu . |
open sheet on workbook open
Stu
You can use VBA Workbook_Open code to go to the specific sheet. Right-click on the Excel Icon at top-left corner of Menu Bar. Select "View Code. Paste this code in there. Save the file. Sub WorkBook_Open() WorkSheets("Sheet3").Activate End Sub OR use Workbook_BeforeClose code to set the worksheet as the active sheet upon closing the workbooK. Note: with either method the code goes into the ThisWorkbook module, not a general or worksheet module. In a general module you would use Sub Auto_Open() or Sub Auto_Close() BTW........most of this was answered by Tom and Chip on October 15th in answer to your post "How to get a macro to run when a document is closed or opened" http://groups.google.com/groups?selm...rum-nospam.com Gord Dibben XL2002 On Mon, 20 Oct 2003 00:50:39 +0100, "Stu" wrote: How do I set a macro to open a specific sheet each time the XL file is opened? Thanks |
open sheet on workbook open
Sub Auto_Open()
Worksheets("sheet1").Activate End sub placed in a general module. Or to use the Workbook_Open Event, go to the project explorer and double click on the ThisWorkbook entry for your project In the left dropdown at the top, select Workbook, in the Right, Open Private Sub Workbook_Open() Worksheets("sheet1").Activate End Sub -- Regards, Tom Ogilvy Stu wrote in message ... How do I set a macro to open a specific sheet each time the XL file is opened? Thanks -- Stu |
All times are GMT +1. The time now is 02:59 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com