stuartmacdonald
New Member
- Joined
- May 26, 2009
- Messages
- 48
I need to run a macro on a workbook that cannot be saved as a macro-enabled workbook, so I have set up a second workbook (Refresh.xlsm) and added the code below to open the workbook if want to run the macro in (Project check.xlsx) and then run a macro from Refresh.xlsm.
This code opens the workbook, but fails to run the macro. I get an error message 'Sorry, we couldn't find Refresh.xlsm'. Is it possible it was moved, renamed or deleted?'
Given both files are in the same folder, and the first one opens fine, something must be amiss, any ideas?
This code opens the workbook, but fails to run the macro. I get an error message 'Sorry, we couldn't find Refresh.xlsm'. Is it possible it was moved, renamed or deleted?'
Given both files are in the same folder, and the first one opens fine, something must be amiss, any ideas?
Code:
Sub openBk()
Workbooks.Open "C:\Users\Stuart MacDonald\OneDrive - Cles\Order book\Project check.xlsx"
Application.Run "C:\Users\Stuart MacDonald\OneDrive - Cles\Order book\Refresh.xlsm'!Refresh"
End Sub
Last edited: