How do I set a worksheet to be the default at startup?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a workbook that has more than 50 worksheets. I would like the default
to open to the first worksheet when the file is opened, not the last one
accessed when last saved. Is it possible to do easily?

thanks,
dan
 
Put this in a general module:

Option Explict
sub auto_Open()
application.goto worksheets(1).range("a1"),scroll:=true
'or
application.goto worksheets("MyFavoriteSheet").range("a1"),scroll:=true
End sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
Thanks, Dave! works beautifully...after I changed the spelling of Explicit...

dan
 

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

Back
Top