Excel does not have a lot of command line options but a file name is one.
So you could open a specific workbook with a shortcut like this:
C:\mso\mso03\OFFICE11\EXCEL.EXE c:\book1.xls
This will open a new Excel instance with each execution (or it does for me).
After the first opening though you do get warned that the workbook is
already open.
You can open a file read-only like this:
C:\mso\mso03\OFFICE11\EXCEL.EXE /r C:\book1.xls
A shortcut to the workbook directly: C:\Book1.xls (w/o Excel.exe on the
command line), would likely use the same Excel instance (depends on your
registry file associations but the default is to use the same instance).
Another approach is to run a script to start Excel and load a workbook via
automation. This gives you more control over the process if you need it.
--
Jim
|
| | > How about a simple macro that checks the user's name and switches to the
| > right sheet when the workbook opens?:
| >
| > This goes in the ThisWorkbook module.
| >
| > Private Sub Workbook_Open()
| > Select Case Application.UserName
| > Case "Joe"
| > Sheet1.Activate
| > Case "Sally"
| > Sheet2.Activate
| > '...
| > End Select
| > End Sub
| >
| >
| > --
| > Jim
|
| Jim,
|
| Thanks, but in my post I was trying to simplify my needs and wasn't
entirely
| accurate in my description (my bad).
|
| The need is to open the same file four times on the same PC, each in it's
| own instance of Excel. Specifically we want to have multiple monitors
each
| display a different sheet of said file. The request is predominantly
about
| how to pass a startup option to excel from the command line.
|
| Thanks for the help.
|
|