Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Application State on file Open

Hi all, I'm using Excel under MS Vista (I think that's Excel 2007?)
and I want to set certain things when a file opens and closes like
sheet protections, hidden tabs, passwords. I've seen it done where a
series of macros are run as soon as the file opens or closes. Can
anyone tell me if there is a specific module name or sub name that
triggers a macro to run automatically on file open or close? or, more
generally, how do I get a macro to run automatically in these cases?

Many thanks!

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 477
Default Application State on file Open

In your wb do an Alt+F11 to get into the VBE;
Once in there - do a Control+R - hold-down the control key
and press the R key - that will put you into the Project Explorer
Window - Look for the "Thisworkbook" node.
Double-Click it and it puts you into the Code Window
you will see two drop-down boxes at the top of this window.
On the left one - you should see "General" - click the drop-down
then you should see Workbook << click on it !!
When you do an Event-handler will fill the screen -- it's name
Workbook_Open...

Put your code between these two lines,, save and close the
workbook. THen Open Again

Good Luck !!






" wrote:

Hi all, I'm using Excel under MS Vista (I think that's Excel 2007?)
and I want to set certain things when a file opens and closes like
sheet protections, hidden tabs, passwords. I've seen it done where a
series of macros are run as soon as the file opens or closes. Can
anyone tell me if there is a specific module name or sub name that
triggers a macro to run automatically on file open or close? or, more
generally, how do I get a macro to run automatically in these cases?

Many thanks!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
double clicking .xls file doesn't open application Namdiel Setting up and Configuration of Excel 1 January 18th 06 06:00 AM
How do I start a new application when I open a file? jkwillis99 Excel Discussion (Misc queries) 1 January 13th 06 01:16 PM
Can Excel open a new application for every file opened? shoon Excel Discussion (Misc queries) 1 December 13th 05 04:43 PM
Can Excel open a new application every time you open a file? shoon Setting up and Configuration of Excel 0 December 13th 05 03:28 PM
Excel opening but file does not open with Application eWisdom Excel Discussion (Misc queries) 1 March 10th 05 05:53 PM


All times are GMT +1. The time now is 08:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"