sachin.acharya
Board Regular
- Joined
- Nov 5, 2009
- Messages
- 93
Hi all,
From within the code in an Add-In I am trying to call a procedure from the ActiveWorkbook. So my code looks somewhat like:
This works fine if ActiveWorkbook.Name does not have spaces. But say if my ActiveWork.Name is "Blah Blah Blah.xls" it gives the error:
Cannot run the macro 'Blah Blah Blah.xls!SomeProcedure'. The macro may not be available in this workbook or all macros may be disabled.
Is there a way around this so that I don't have to rename or save the active file without spaces?
Thanks.
From within the code in an Add-In I am trying to call a procedure from the ActiveWorkbook. So my code looks somewhat like:
HTML:
Sub MyProcedureInAddin()
'My code here...
Run ActiveWorkbook.Name & "!SomeProcedure"
'My code continues...
End Sub
This works fine if ActiveWorkbook.Name does not have spaces. But say if my ActiveWork.Name is "Blah Blah Blah.xls" it gives the error:
Cannot run the macro 'Blah Blah Blah.xls!SomeProcedure'. The macro may not be available in this workbook or all macros may be disabled.
Is there a way around this so that I don't have to rename or save the active file without spaces?
Thanks.