Results 1 to 2 of 2
  1. #1
    Cecil Rhoades

    Conditionally launching macro

    Excel 97 on NT
    I would like to launch a macro based on a command line switch, but cannot figure out how to do it. In Access ...Access.exe /x MacroName works, but no such thing Exists in Excel. I cannot seem to capture the command line with the VB command "Command" either. If it did work, I could use the workbook open event with a select case statement. The only thing I can get to work is to use WSH to launch Excel, open the workbook and then launch the macro.

    What alternatives have I missed? Thanks.

  2. #2
    4 Star Lounger
    Join Date
    Jan 2001
    Kortrijk, Belgium
    Thanked 0 Times in 0 Posts

    Re: Conditionally launching macro

    I don't know if this works for Excel 97, but in Excel 2000 it should be possible to start up Excel and open a specified file in read-only mode.

    Excel.exe/r filename

    Haven't tried it out myself...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts