JeffGrant
Well-known Member
- Joined
- Apr 7, 2021
- Messages
- 558
- Office Version
- 365
- Platform
- Windows
Hi All,
I found this code from user 30percent from 2011 and am trying to adapt it for my use.
I am trying to run:
Thisworkbook = New System 80E-1.xlsm
Macro to run in this workbook = CreateUniqueBDIF
On an external workbook called Results.xlsx.
However, I keep getting this 104 error:
saying the macro is not available, when it is definitely there.
Can somebody please tell me what I am doing wrong.
Thanks in advance for your help.
I found this code from user 30percent from 2011 and am trying to adapt it for my use.
I am trying to run:
Thisworkbook = New System 80E-1.xlsm
Macro to run in this workbook = CreateUniqueBDIF
On an external workbook called Results.xlsx.
VBA Code:
Sub Open_External_Workbook_Run_Macro()
Dim open_Workbook As Workbook
Dim wb As Workbook
Workbooks.Open Filename:="C:\Users\jeff\Desktop\BetfairBot\Results.xlsx"
Set open_Workbook = Application.Workbooks.Open("C:\Users\jeff\Desktop\BetfairBot\Results.xlsx")
Set wb = Workbooks.Open("C:\Users\jeff\Desktop\New Horses\New System 80E-1.xlsm")
Application.Run wb.Name & "!" & "CreateUniqueBDIF"
End Sub
However, I keep getting this 104 error:
saying the macro is not available, when it is definitely there.
Can somebody please tell me what I am doing wrong.
Thanks in advance for your help.