OK - here is the scenario:
Main macro opens a selected workbook to be 'worked on'.
This workbook is then closed by the user using the standard 'X' (NB Not by a macro code line)
I want to suspend macro execution in the main macro while the new workbook is 'worked on' until the new workbook is closed and saved, and then continue it (it basically re-opens an updated UI).
In the 'This workbook' section of the 'new' workbook to open I have:
What I cannot seem to do is get the main macro to continue after the 'new' workbook is closed and saved. Even if I try to run a new macro in the main section to execute the desired actions I am told (correctly, Excel 2016) I cannot open two versions of the same workbook.
Is there anything I can add to the Workbook AfterSave code in place of ??? (or in the main macro) to do this?
Main macro opens a selected workbook to be 'worked on'.
This workbook is then closed by the user using the standard 'X' (NB Not by a macro code line)
I want to suspend macro execution in the main macro while the new workbook is 'worked on' until the new workbook is closed and saved, and then continue it (it basically re-opens an updated UI).
In the 'This workbook' section of the 'new' workbook to open I have:
Code:
Sub Workbook AfterSave(ByVal Success As Boolean)
If Success = True Then
ActiveWorkbook.Close SaveChanges:=True
???
End If
Is there anything I can add to the Workbook AfterSave code in place of ??? (or in the main macro) to do this?