After the secure file has been saved I want the new filename and the saving date to be automatically written in the header of all the sheets of the still open new secure workbook. My sub to do this works fine anytime as I manually start the macro.
However my first problem is, that I need an event to fire the macro automatically shortly AFTER the saving process has been accomplished. My choice was the Private Sub Workbook_AfterSave(ByVal Success As Boolean) Event. After packing my code in such an automatically fired sub and packing the sub in the workbook the following happened:
In an uncoded file the saving-process is accomplished first and the macro code is performed afterwards. As intended.
To the padlock-coded file the following happens: After typing the saving button the macro code is performed first and the saving-process is only accomplished afterwards. This of course makes the Private Sub Workbook_AfterSave Event useless for a coded file.
What can I do to achieve with an encoded file, that a macro code is only started, AFTER the saving process has been accomplished?
I also want to use the Private Sub Workbook_Open() Event to write the headers each time after the coded workbook has been opened. My second problem is, that I can only include one event sub in the workbook. Either Workbook_open or workbook_AfterSave. What can I do?