I am running a macro that goes into another application (SAP). In SAP it downloads data and exports it to an Excel file. by default when you export a file from SAP it automatically opens up (I don't want to change this default). But the spreadsheets don't open up until after the macro is done running. This results in one or multiple spreadsheet (that are no longer needed) opening up after the macro runs.
Is there a way to have a second macro run automatically after one macro has completed? (But can't be called by the first macro since the spreadsheets don't open until the first macro is completely done running.)
Or is there another options that I am not thinking of?
I have added code, to the BeforeClose option for the workbook, that closes the extra spreadsheets when you close the spreadsheet with the macro. But this approach isn't very convenient. I'm hoping there is a better option.
I have also added the Wait application to see if the spreadsheets would open while the macro was "waiting". But no luck.
Any help is appreciated.
Is there a way to have a second macro run automatically after one macro has completed? (But can't be called by the first macro since the spreadsheets don't open until the first macro is completely done running.)
Or is there another options that I am not thinking of?
I have added code, to the BeforeClose option for the workbook, that closes the extra spreadsheets when you close the spreadsheet with the macro. But this approach isn't very convenient. I'm hoping there is a better option.
I have also added the Wait application to see if the spreadsheets would open while the macro was "waiting". But no luck.
Any help is appreciated.