I'd like to build a macro in a workbook ( A) which does:
1) Open another workbook ( B)
2) Update some cells in (B) which are the parameters for a macro already built in (B) , called "get data" (Parameter one-> the path, parameter two -> name of the file with data)
3) Run the macro in (B) which upload the data in a spreadsheet of (B),
4) Save B and close it.
If I open B and update manually the parameters ( specific cells in the first page ) and run the macro "Get data", it works perfectly.
But if I call this macro from another workbook , it gives me "error messages".
--------------------------------------------------------------------------------------------------------------
Dim RTMWB As Workbook
RTMPath = \\aaaaaaaaaa\Wrokbook(B).xlsb
Set RTMWB = Workbooks.Open(RTMPath, ignorereadonlyrecomanded = True) ..... "The RTMWB opens correctly
Application.Run (RTMWB!loadRDEToSheet)
With RTMWB
.SaveAs Filename:=OutputPath & SavingWBName & "_" & Period & "_" & Run & ".xlsb"
.Close
End With
------------------------------------------------------------------------------------------------------------
When it is supposed to run the "application.run" I get the error message "runtime error 438 . Object or methond doesn't suport this property"
I'm afraid that I'm wrong in the sintax of the Aplication.Run .
I'd really apreciate your help.
Bookmarks