Hi,
I have two excel instances running in memory.
In one instance I have loaded a macro-enabled file File_A.xlsb
While remaining in this excel instance I want to do the following:
A) see the other(B) instance of the excel and force execute a macro ABC which is already available in that instance.
I am doing this but getting stuck up in the last line of the code(i.e Run xl.ActiveWorkbook.FullName & "!ABC").
Dim xl As Application
For Each xl In GetExcelInstances()
If Right(xl.ActiveWorkbook.FullName, 11) = "Master.xlsb" Then
Run xl.ActiveWorkbook.FullName & "!ABC"
End If
Next
The error as popped up on the screen say:
Cannot run the macro 'D:\Amjad\MyFile.xlsb!ABC'. The macro may not be available in this workbook or all macros may be disabled.
I have two excel instances running in memory.
In one instance I have loaded a macro-enabled file File_A.xlsb
While remaining in this excel instance I want to do the following:
A) see the other(B) instance of the excel and force execute a macro ABC which is already available in that instance.
I am doing this but getting stuck up in the last line of the code(i.e Run xl.ActiveWorkbook.FullName & "!ABC").
Dim xl As Application
For Each xl In GetExcelInstances()
If Right(xl.ActiveWorkbook.FullName, 11) = "Master.xlsb" Then
Run xl.ActiveWorkbook.FullName & "!ABC"
End If
Next
The error as popped up on the screen say:
Cannot run the macro 'D:\Amjad\MyFile.xlsb!ABC'. The macro may not be available in this workbook or all macros may be disabled.