I have a problem with running a vba macro from another excel workbook. I have a excel workbook called “Test.xlsx”. From this workbook I am using a macro called test. This should open a workbook called “xxx_yyy.xlsm”. From the workbook “xxx_yyy.xlsm” I would like to use the macros Marko1, Makro2, Makro3.
Therefore I wrote the code below.
But with the command line “Application.Run” for marko1 I’m getting a runtime error, because macro is either not available or macro is deactivated. If I’m going to outline the command line for Marko1 and start with Marko2 everythings run fine.
I don’t know why I’m getting this runtime error. Does anyone have an idea
`Sub test()
Workbooks.Open Filename:= _ “C:UserDesktopxxx_yyy.xlsm” _ , UpdateLinks:=0 Workbooks(“xxx_yyy.xlsm”).Activate
Application.Run “‘xxx_yyy.xlsm’!Makro1” Application.Run “‘xxx_yyy.xlsm’!Makro2” Application.Run “‘xxx_yyy.xlsm’!Makro3”
End sub’
Blockquote