Fenrirshowl
Technical User
Hi all
We have a spreadsheet provided to us from another company. The VBAProject is protected and I do not know the password.
On worksheet "Main" there is a shape ("Rectangle 2") which has a macro assigned ("ShowInputForm").
We are trying to automate our process with VBA but we have a roadblock in triggering the "ShowInputForm" macro.
I do not know what module the macro is in. I cannot cycle all the VBA components as the VBAProject is protected.
Due to the error message I receive (after trying to simulate the call within a workbook of my own) I suspect the macro may be in the "ThisWorkbook" module.
Application.Run workbookname!macroname
will not work: Run-time error '1004' Cannot run the macro 'workbookname!macroname'. The macro may not be available in this workbook or all macros may be disabled.
Macros are not disabled.
I cannot seem to call the macro directly with VBA, so I was hoping it is possible to simulate the click on the shape. I am struggling to find the appropriate code.
Can anyone assist please?
Thanks in advance
Fen
We have a spreadsheet provided to us from another company. The VBAProject is protected and I do not know the password.
On worksheet "Main" there is a shape ("Rectangle 2") which has a macro assigned ("ShowInputForm").
We are trying to automate our process with VBA but we have a roadblock in triggering the "ShowInputForm" macro.
I do not know what module the macro is in. I cannot cycle all the VBA components as the VBAProject is protected.
Due to the error message I receive (after trying to simulate the call within a workbook of my own) I suspect the macro may be in the "ThisWorkbook" module.
Application.Run workbookname!macroname
will not work: Run-time error '1004' Cannot run the macro 'workbookname!macroname'. The macro may not be available in this workbook or all macros may be disabled.
Macros are not disabled.
I cannot seem to call the macro directly with VBA, so I was hoping it is possible to simulate the click on the shape. I am struggling to find the appropriate code.
Can anyone assist please?
Thanks in advance
Fen