PC Review


Reply
Thread Tools Rate Thread

Open workbook to a specific sheet

 
 
Bill Titus
Guest
Posts: n/a
 
      17th Dec 2004
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.



 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      17th Dec 2004
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.
>
>
>



 
Reply With Quote
 
Beege
Guest
Posts: n/a
 
      17th Dec 2004
Bill,

='N:\Calendars\[PlanningCalendar.xls]JAN05'!A1

in a cell should get you there, use a range if you have to see the whole
calendar...

Brian


"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.
>
>
>



 
Reply With Quote
 
Bill Titus
Guest
Posts: n/a
 
      17th Dec 2004
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.
> >
> >
> >

>
>



 
Reply With Quote
 
Beege
Guest
Posts: n/a
 
      17th Dec 2004
Sorry. I misunderstood what you were asking....

Try Google "command line" and "specific cell"


"Beege" <bwgilman__@hotmail.com> wrote in message
news:4lCwd.276256$R05.159408@attbi_s53...
> Bill,
>
> ='N:\Calendars\[PlanningCalendar.xls]JAN05'!A1
>
> in a cell should get you there, use a range if you have to see the whole
> calendar...
>
> Brian
>
>
> "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.
>>
>>
>>

>
>



 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      17th Dec 2004
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.
>> >
>> >
>> >

>>
>>

>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
open workbook to specific sheet Mr E Microsoft Excel Worksheet Functions 1 9th Apr 2010 07:53 PM
Open workbook at specific sheet Adele Russell Microsoft Excel Misc 2 3rd Feb 2004 02:38 PM
Open a workbook at a specific sheet Kevin Microsoft Excel Misc 3 31st Oct 2003 11:20 PM
Re: Open a workbook in a specific sheet pfsardella@yahoo.com.nospam Microsoft Excel Worksheet Functions 0 27th Oct 2003 09:12 PM
Re: Open a workbook in a specific sheet Gord Dibben Microsoft Excel Worksheet Functions 0 27th Oct 2003 07:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:44 AM.