dougmarkham
Active Member
- Joined
- Jul 19, 2016
- Messages
- 252
- Office Version
- 365
- Platform
- Windows
Hi everyone,
Hope you're having a great Friday!
I am running a sequence of macros as follows:
The sequence is interrupted when Macro 4 runs to close another workbook via...
The file it's closing is a *.xltm file---if that makes any difference.
Is it possible to resume the sequence of macros after the VBA in one of the macros closes another workbook?
Also, I am interested to know why this happens: is this happening because the workbook I'm closing becomes active prior to closing, thus stopping the macro sequence from completing?
If you would help me with this, I'd be very grateful
Kind regards,
Doug.
Hope you're having a great Friday!
I am running a sequence of macros as follows:
Code:
Sub RunMacroSequence_Click()
Call ClearContentsBelowRowTwo 'Macro1
Call copyDataFromMultipleWorkbooksIntoMaster 'Macro2
Call ExportOpsManPOReconExport 'Macro3
[B][COLOR=#b22222] Call CloseWorkbookCCSWithoutSaving 'Macro4[/COLOR][/B]
Call CloseWorkbookAPSWithoutSaving 'Macro5
Call CloseWorkbookCognosLMSImporterWithoutSaving 'Macro6
Call openwbPOReconLive 'Macro 5
End Sub
The sequence is interrupted when Macro 4 runs to close another workbook via...
Code:
Sub CloseWorkbookCCSWithoutSaving()
Workbooks("CCS Template2").Close SaveChanges:=False
End Sub
The file it's closing is a *.xltm file---if that makes any difference.
Is it possible to resume the sequence of macros after the VBA in one of the macros closes another workbook?
Also, I am interested to know why this happens: is this happening because the workbook I'm closing becomes active prior to closing, thus stopping the macro sequence from completing?
If you would help me with this, I'd be very grateful
Kind regards,
Doug.