Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do I set a macro to open a specific sheet each time the XL file is
opened? Thanks -- Stu |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
open to a certain sheet tab in a different workbook | New Users to Excel | |||
How can I set a workbook to open always with a certain sheet I wan | Setting up and Configuration of Excel | |||
Search open sheets in workbook and insert into open sheet | Excel Discussion (Misc queries) | |||
Open workbook on same sheet? | Excel Discussion (Misc queries) | |||
Open workbook at a particular sheet | New Users to Excel |