VBA just stops when opening a macro workbook
Dave,
Thanks for your idea.
I checked, there is not a hotkey associated with my macro or the macro in
the workbook being opened. I also tried turning off all addins and stepping
thru the code 1 line at a time using the f8 key...the VBA still dies just
after the workbook with the macros are open.
I even thought it might have something to do with the macros being event
driven, sheet level macros, class macros or module level type macros...no
change in results. :(
--
Thx
MSweetG222
"Dave Peterson" wrote:
I'm betting that you're running your macro using a shortcut key. And that
shortcut key combination includes the shift-key.
Remove the shift-key from the shortcut key and try it again.
MSweetG222 wrote:
Hello,
I have written VBA code to open workbooks, perform procedures and then saves
and close the workbooks. Every thing works just fine until I get to a
workbook that has a macro, then my VBA stops just after the workbook with the
macro is opened.
No error messages. It just stops. The call stack totally disappears.
I have tried turning off events just before opening the workbook with the
macro, but that did not work.
I have tried "On Error" statements, that did not work.
I have tried signing with workbook with a trusted certificate, did not help.
QUESTION: What do I need to do to open macro workbooks and perform my
procedures with out my VBA terminating like this?
Example:
Application.EnableEvents = False
Workbooks.Open Filename:= "C:\Test\ExcelWB_Template.xls"
' This is where my VBA just stops
Range("A1").FormulaR1C1 = "ABC Company"
Range("A2").FormulaR1C1 = "123"
--
Thx
MSweetG222
--
Dave Peterson
|