Hi,
I have a workbook that I'd like to a run code that needs to trigger codes in other two workbooks..
Below is the code i am using. First two lines are to trigger codes in other two workbooks. The name of the code in those workbooks is Run under Summary sheet. Under the In each workbook Run Macro calls for other Macro's to run.
Below code is under thisworkbook module. When I run the code below it returns Run Time Error 1004.. I can run the codes without any issues by opening each workbook however I am not able to right from the active workbook.. What may cause this problem? Is below code not correct?
I have a workbook that I'd like to a run code that needs to trigger codes in other two workbooks..
Below is the code i am using. First two lines are to trigger codes in other two workbooks. The name of the code in those workbooks is Run under Summary sheet. Under the In each workbook Run Macro calls for other Macro's to run.
Below code is under thisworkbook module. When I run the code below it returns Run Time Error 1004.. I can run the codes without any issues by opening each workbook however I am not able to right from the active workbook.. What may cause this problem? Is below code not correct?
VBA Code:
Sub RunAll()
Application.Run "'C:\Users\dokat\OneDrive - BIC\BIC\Power BI\Trade Report\Upload Data\2017-2022 6 Year Trended PnL by L3 - YTD.xlsm'!Summary.Run"
Application.Run "'C:\Users\dokat\OneDrive - BIC\BIC\Power BI\Trade Report\Upload Data\2017-2022 6 Year Trended PnL by L3 - Month.xlsm'!Summary.Run"
Call CopyPasteMTDYTD
End Sub