Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 132
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run Macro from Command line Phil Smith Excel Discussion (Misc queries) 1 July 21st 07 06:35 PM
Running a macro from the command line Czech Excel Programming 1 October 28th 04 09:51 PM
call excel 2003 macro from command line Keven[_2_] Excel Programming 1 June 2nd 04 05:33 AM
Command line parameters into a macro Donemowe Excel Programming 3 August 6th 03 09:12 AM
Excel macro on a DOS command line Richard[_13_] Excel Programming 3 July 18th 03 03:35 AM


All times are GMT +1. The time now is 10:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"