Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 50
Default Run Macro from Command line

I want to run a macro when I open a particular spreadsheet. I know I
can get a macro to run every single time it opens, but I do not want
that. I want to start Excel externally, (from a shortcut) and either
load it and run the macro, or load it and not run the macro.

I do not see any option to open and run a macro from the command line.

Does it exist? Is there another way to pull this off?

Phil
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 903
Default Run Macro from Command line

You could put data into a text file and read that from
your VBA code. You could use a .bat file to create/modify
the file.

--
HTH,
David McRitchie, Microsoft MVP - Excel
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Phil Smith" wrote in message ...
I want to run a macro when I open a particular spreadsheet. I know I
can get a macro to run every single time it opens, but I do not want
that. I want to start Excel externally, (from a shortcut) and either
load it and run the macro, or load it and not run the macro.

I do not see any option to open and run a macro from the command line.

Does it exist? Is there another way to pull this off?

Phil



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
Command Line Export fjurek Excel Discussion (Misc queries) 6 April 23rd 07 09:08 PM
Scripting from command line [email protected] Excel Discussion (Misc queries) 0 January 24th 07 04:29 PM
How to: Pass Command Line Parameter ??? Webtest Excel Worksheet Functions 0 October 24th 05 05:27 PM
macros from command line Cyberwolf Excel Discussion (Misc queries) 3 July 19th 05 05:35 PM
Q: command line in OE JIM.H. Excel Discussion (Misc queries) 0 May 30th 05 10:48 PM


All times are GMT +1. The time now is 04:06 PM.

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

About Us

"It's about Microsoft Excel"