LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Excel command line

Maybe just one shortcut...

Dim macro
Dim XLApp
Dim XLWkb
Dim MacroName

If wscript.arguments.count = 0 Then
macroName = InputBox ("type a macro name")
Else
macroname = WScript.Arguments.item(0)
end If

If macroname = "" Then
'do nothing
Else
macro = "Personal.xla!" & macroname

Set XLApp = CreateObject("Excel.Application")

xlapp.visible = true
xlapp.workbooks.add
xlapp.workbooks.open "c:\yourpath\XLSTART\personal.xla"

xlapp.run macro

End If


And just have the .vbs prompt you for the macro name.

wrote:

kewl - works!
"excel.vbs" was a working title.
Saving shortcuts (such as e.vbs) in c:\windows\command puts them on the
command Path and thus accessable via the Run box with minimal
keystrokes, reducing final useage to "windows-r e.vbs macroname enter"
which is much more convenient than clearing screen to the desktop to
locate/double-click an icon; at least for me.


--

Dave Peterson
 
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
Are there command line parameters for Excel? Michael Excel Discussion (Misc queries) 9 August 5th 07 06:29 PM
command line Excel Script [email protected] Excel Discussion (Misc queries) 0 August 22nd 06 01:23 PM
Run Excel Macro from Command Line Al Franz Excel Programming 3 June 13th 05 08:18 AM
Command line parameters to Excel Tom Walker Excel Programming 3 May 23rd 04 06:08 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 12:47 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"