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

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?
 
G

Gord Dibben

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
 
M

Marvin Hlavac

Hi Gord,

Thanks a million. I just pasted it and it does exactly what I needed.
Thanks, thanks, thanks!!!
 
G

Gord Dibben

You're welcome, welcome, welcome.

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

Gord
 
S

sepeda3

-----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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top