Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running a macro from a command line
Hi all, can anyone tell me if you can referance a xls workbook and run the
macro within form a command line? I am now using an on Open event so it auto runs when it is open but i was wondering if I could run it by referencing it? Kelly |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running a macro from a command line
Kelly
You cannot run a macro from the command line. What you're doing with the Auto_Open or Workbook_Open is it. Gord Dibben Excel MVP On Thu, 25 Nov 2004 14:22:17 -0800, "Kelly" wrote: Hi all, can anyone tell me if you can referance a xls workbook and run the macro within form a command line? I am now using an on Open event so it auto runs when it is open but i was wondering if I could run it by referencing it? Kelly |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running a macro from a command line
Thanks Gord, Can you suggest a method to open and edit the macro without it
auto-running? Here's the situation. It is fairly quick code so it is really tough hit escape quick enough to stop it form running. Also It is digitaly signed so it never prompts me ands asks if I want to run the macro. this is true even if I set the security setting sto high. The only way I have found to open the workbook and edit the macro is to open excel and remove the athorization of the the digital certificate THEN sdet security settings to med or high. There has to be a better way? I read somewhere if you hold the shift button down while you open the wkbk it will not run the code but this does not work for me?? Any ideas? Thanks again, Kelly "Gord Dibben" wrote: Kelly You cannot run a macro from the command line. What you're doing with the Auto_Open or Workbook_Open is it. Gord Dibben Excel MVP On Thu, 25 Nov 2004 14:22:17 -0800, "Kelly" wrote: Hi all, can anyone tell me if you can referance a xls workbook and run the macro within form a command line? I am now using an on Open event so it auto runs when it is open but i was wondering if I could run it by referencing it? Kelly |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running a macro from a command line
Kelly
I am surprised to hear the SHIFT key is not working for you. Open another workbook or start Excel with no workbook and copy this to the Immediate Window of VBE Application.EnableEvents = False Open the other workbook and the workbook_open code won't run. Do your editing and save/close. In VBE Immediate Window enter Application.EnableEvents = True Gord Dibben Excel MVP On Fri, 26 Nov 2004 07:21:03 -0800, "IXLINXL" wrote: Thanks Gord, Can you suggest a method to open and edit the macro without it auto-running? Here's the situation. It is fairly quick code so it is really tough hit escape quick enough to stop it form running. Also It is digitaly signed so it never prompts me ands asks if I want to run the macro. this is true even if I set the security setting sto high. The only way I have found to open the workbook and edit the macro is to open excel and remove the athorization of the the digital certificate THEN sdet security settings to med or high. There has to be a better way? I read somewhere if you hold the shift button down while you open the wkbk it will not run the code but this does not work for me?? Any ideas? Thanks again, Kelly "Gord Dibben" wrote: Kelly You cannot run a macro from the command line. What you're doing with the Auto_Open or Workbook_Open is it. Gord Dibben Excel MVP On Thu, 25 Nov 2004 14:22:17 -0800, "Kelly" wrote: Hi all, can anyone tell me if you can referance a xls workbook and run the macro within form a command line? I am now using an on Open event so it auto runs when it is open but i was wondering if I could run it by referencing it? Kelly |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running a macro from a command line
Much Thanks!
"Gord Dibben" wrote: Kelly I am surprised to hear the SHIFT key is not working for you. Open another workbook or start Excel with no workbook and copy this to the Immediate Window of VBE Application.EnableEvents = False Open the other workbook and the workbook_open code won't run. Do your editing and save/close. In VBE Immediate Window enter Application.EnableEvents = True Gord Dibben Excel MVP On Fri, 26 Nov 2004 07:21:03 -0800, "IXLINXL" wrote: Thanks Gord, Can you suggest a method to open and edit the macro without it auto-running? Here's the situation. It is fairly quick code so it is really tough hit escape quick enough to stop it form running. Also It is digitaly signed so it never prompts me ands asks if I want to run the macro. this is true even if I set the security setting sto high. The only way I have found to open the workbook and edit the macro is to open excel and remove the athorization of the the digital certificate THEN sdet security settings to med or high. There has to be a better way? I read somewhere if you hold the shift button down while you open the wkbk it will not run the code but this does not work for me?? Any ideas? Thanks again, Kelly "Gord Dibben" wrote: Kelly You cannot run a macro from the command line. What you're doing with the Auto_Open or Workbook_Open is it. Gord Dibben Excel MVP On Thu, 25 Nov 2004 14:22:17 -0800, "Kelly" wrote: Hi all, can anyone tell me if you can referance a xls workbook and run the macro within form a command line? I am now using an on Open event so it auto runs when it is open but i was wondering if I could run it by referencing it? Kelly |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Run Macro from Command line | Excel Discussion (Misc queries) | |||
Running a macro from the command line | Excel Programming | |||
call excel 2003 macro from command line | Excel Programming | |||
Command line parameters into a macro | Excel Programming | |||
Excel macro on a DOS command line | Excel Programming |