1
votes

I have a subroutine that opens a workbook containing a macro. I then want to run that macro. My code looks like this:

Source = "C:\Users\208896\Desktop\Moje Makra\newidea-inbound-query.xlsm"

Workbooks.Open (Source)

Application.Run "newidea-inbound-query.xlsm!InboundQueryMacro"

The name of the macro is correct, it is in Module1, all macros are enabled.

I get the error:

Macro may not be available in this workbook or all macros may be disabled

1
Try to ise the Call-FunctionJ.schmidt

1 Answers

2
votes
Application.Run ("'Name of the book'!ModuleName.SubName")