
08-22-2006, 06:25 AM
|
|
|
|
Re: Run macro from command line
Alan,
What is "process_create" ? Similar to Shell ?
You could specify a workbook that has a suitable routine in its
Workbook_Open event instaed of the "file.txt".
And there are ways to read the command line to Excel so you can pass more
parameters, e.g. the text file to open, the .SaveAs file name etc.
Declare Function GetCommandLine Lib "kernel32" Alias "GetCommandLineA" () As
String
But still need a macro in the WB open to do the saving.
Or use a VBScript + Automation
NickHK
"Alan Wilson" <Alan.Wilson.2cxoq2_1156237205.3892@excelforum-nospam.com>
wrote in message
news:Alan.Wilson.2cxoq2_1156237205.3892@excelforum-nospam.com...
>
> I can open a tab-separated file automatically from the command line, eg
> process_create("excel.exe","file.txt"), but then I want to Save As an
> Excel file: I can create a macro to do that, but how can I run the
> macro automatically, on the command line?
> Any help appreciated!
>
>
> --
> Alan Wilson
> ------------------------------------------------------------------------
> Alan Wilson's Profile:
http://www.excelforum.com/member.php...o&userid=37858
> View this thread: http://www.excelforum.com/showthread...hreadid=574090
>
|