Linda's Computer Stop Home Page

Introduction to Simple VBA macros:

Automatically display a specific Excel sheet 

 

When you save a workbook, Excel maintains which worksheet and cell has focus at the time so that the next time you open the file you're returned to the same place. However, you may prefer that Excel consistently displays the same sheet when you open the file, such as when a worksheet acts as a table of contents for the workbook. You can force Excel to display your desired sheet using VBA. To do so, press [Alt][F11] to display the VB Editor. In the Project Explorer, if necessary, expand the tree views for your workbook and Microsoft Excel Objects. Then, double-click the This Workbook icon that appears beneath your workbook's name. Next, select Workbook from the Object dropdown list and Open from the Procedure dropdown list. At the insertion point, enter:

 

Worksheets("Sheet1").Select

 

Finally, press [Alt][F11] again to return to Excel and save the file. This procedure will display Sheet1 in the workbook any time the file is opened. You can substitute the name found on any worksheet tab if you'd rather open to another sheet.

 

Search  

SITE MAP

HOME

ADVERTISE

About
Linda
See my résumé

Read my blog :-)

Contact
Linda

Support

Articles written
by Linda

Testimonials

Free
MS Office
Tips &
Tutorials
choose one

FREE Tips & Tutorials

WINDOWS

IE/OE

HARDWARE

REGISTRY

DOWNLOADS
SIDE by SIDE
Fun LINKS

 

Join
Linda's
Free
MS Office
Group
Join and help others as well as yourself

 

Privacy Policy, Disclaimer, and Legal Stuff    

Pay Per Click Ads by Pay Per Click Advertising by Kontera

This site was last updated on Monday, April 18, 2011 . copyright © 2000 - 2008, Linda F. Johnson, Linda's Computer Stop. All rights reserved.