Bill
You cannot call a macro from a Command line.
You must place the code in a Workbook_Open Sub in ThisWorkbook or an Auto_Open
Sub in a General module.
You then open the workbook from the Command line and the macro runs.
Sub Workbook_Open()
Sheets("MySheet").Activate
'if want a specific cell add
Range("G23").Select
End Sub
See Excel's Help for "startup switches" to get the command line to open a
workbook.
Or just make a shortcut to the file by pointing to it.
Gord Dibben Excel MVP
On Fri, 17 Dec 2004 11:34:10 -0500, "Bill Titus" <(E-Mail Removed)> wrote:
>Thanks, Don.
>
>I'm afraid that "modules" doesn't resonnate with me.
>
> I'm looking for a command line solution. If I can pass parameters from a
>command line to a startup macro that accomplishes what I want, what would
>the command line and the macro look like?
>
>Bill
>
>"Don Guillett" <(E-Mail Removed)> wrote in message
>news:(E-Mail Removed)...
>> why not just use the workbook_open event in the ThisWorkbook module or
>> auto_open in a regular module?
>>
>> --
>> Don Guillett
>> SalesAid Software
>> (E-Mail Removed)
>> "Bill Titus" <(E-Mail Removed)> wrote in message
>> news:LOBwd.5598$(E-Mail Removed)...
>> > What form of filename and switches will allow me to call a workbook and
>> open
>> > it to a specific worksheet and, if possible, a specific cell. I've tried
>> the
>> > following without success:
>> >
>> > "C:\Program Files\Microsoft Office\Office\EXCEL.EXE"
>> > "N:\Calendars\PlanningCalendar.xls#JAN05!A1"
>> >
>> > Any help will be much appreciated.
>> >
>> >
>> >
>>
>>
>