How to make sure a particular worksheet opens when I open my workbook?

  • Thread starter Thread starter Marvin Hlavac
  • Start date Start date
M

Marvin Hlavac

Hi All,

Is there a way to make sure that a particular worksheet opens every time I
open my workbook? Even if a different sheet was open when I saved it last
time?
 
Martin

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()

Gord Dibben XL2002
 
Hi Gord,

Thanks a million. I just pasted it and it does exactly what I needed.
Thanks, thanks, thanks!!!
 
You're welcome, welcome, welcome.

Thanks for the feedback and I apologise for the "Martin"

Gord
 
-----Original Message-----
Hi All,

Is there a way to make sure that a particular worksheet opens every time I
open my workbook? Even if a different sheet was open when I saved it last
time?

--
Regards,
Marvin Hlavac
Toronto, Canada


.In Windows Explorer, move the icon of the workbook you
want to open to an XLStart folder.
If you want to keep the workbook in its current location,
use the Create Shortcut command on the File menu to
create a shortcut to the workbook, and then move the
shortcut to an XLStart folder.

Restart Excel.
 
Back
Top