Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
double clicking .xls file doesn't open application | Setting up and Configuration of Excel | |||
How do I start a new application when I open a file? | Excel Discussion (Misc queries) | |||
Can Excel open a new application for every file opened? | Excel Discussion (Misc queries) | |||
Can Excel open a new application every time you open a file? | Setting up and Configuration of Excel | |||
Excel opening but file does not open with Application | Excel Discussion (Misc queries) |