Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to get the new name of a workbook immediately after the workbook is saved. Is there an event that is triggered AFTER a save is performed i.e. I need an event like Workbook_AfterSave. I guess I can set a flag in the Workbook_BeforeSave event and then whenever the workbook/worksheet/ etc is clicked check this flag is if set record the workbook name. Any better ideas?
Thanks Lee |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Lee,
You could use the BeforeSave event and handle the whole saving process in your code. Then you'll know the name of the file by the end of the procedure. Rob "Lee Drage" wrote in message ... I need to get the new name of a workbook immediately after the workbook is saved. Is there an event that is triggered AFTER a save is performed i.e. I need an event like Workbook_AfterSave. I guess I can set a flag in the Workbook_BeforeSave event and then whenever the workbook/worksheet/ etc is clicked check this flag is if set record the workbook name. Any better ideas? Thanks Lee |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Lee Drage" wrote...
I need to get the new name of a workbook immediately after the workbook is saved. . . . Why do you believe you need this? The workbook's Name and FullName properties are set after the Excel finishes saving the workbook, so any other macro could access those properties. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
HI Thanks for the reponses.
Thanks, Rob - I had the same idea about handling all the saving myself in the BeforeSave event last night on the train! Harlan - I store the excel workbook name because I need to refer to worksheets and custom toolbars in this workbook even when the user has moved into another workbook. I prefer not to use a variable pointing to the required worksheet because any untrapped error will result in that variable being reset to NULL, so I save the workbook name in a windows INI file. When the user changes the workbook name by SavingAs, I update the INI file. I know the workbook name is changed by Excel straight after the save but I need to a trigger to save this new workbook name to the INI file. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Combobox Click event triggered when copying worksheet | Excel Programming | |||
Macro triggered by an event | Excel Discussion (Misc queries) | |||
Create event triggered by Pivot Chart field button | Excel Programming | |||
Help - Change Event triggered on File Save As | Excel Programming | |||
Event triggered by Hiding/Unhiding columns? | Excel Programming |