Hello,
I have just written a series of VBA macros, one of which involves function calls from an Excel Add In.
As I don't want the Add In to be available all the time when I am in Excel, My VBA code switches the Excel Add In on using the code
AddIns("X").Installed = True followed by
Application.Run "Y" to call up a menu bar.
Once it has been utilized, I have then inserted another piece of VBA code to switch it back off again.
When I run the relevant macros, the Excel Add In pops up and Excel asks me to connect to an external server (from which a special excel function within the add in allows me to pull in data from an external database) :- So far, so good !
My next line of code then tries to select a different sheet in the macro enabled workbook (I am using Excel 2010) at which point it crashes.
If I go into the VBA debugger and place the cursor in the relevant sheet at the appropriate data line and press resume from within the debugger, the macro then continue to work fine, as originally intended.
Does anyone know of a way that I can avoid having this "hiccup" in the middle of my VBA macro, so that it runs smoothly without the need for manual intervention ?
Best Regards,
mcspamj
I have just written a series of VBA macros, one of which involves function calls from an Excel Add In.
As I don't want the Add In to be available all the time when I am in Excel, My VBA code switches the Excel Add In on using the code
AddIns("X").Installed = True followed by
Application.Run "Y" to call up a menu bar.
Once it has been utilized, I have then inserted another piece of VBA code to switch it back off again.
When I run the relevant macros, the Excel Add In pops up and Excel asks me to connect to an external server (from which a special excel function within the add in allows me to pull in data from an external database) :- So far, so good !
My next line of code then tries to select a different sheet in the macro enabled workbook (I am using Excel 2010) at which point it crashes.
If I go into the VBA debugger and place the cursor in the relevant sheet at the appropriate data line and press resume from within the debugger, the macro then continue to work fine, as originally intended.
Does anyone know of a way that I can avoid having this "hiccup" in the middle of my VBA macro, so that it runs smoothly without the need for manual intervention ?
Best Regards,
mcspamj