Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Opening a specified sheet in an Excel file

I am wanting to open a specified sheet in an excel file using START, RUN
command

So far I can open the first sheet but this is probably by default using the
command
"C:\Program Files\Microsoft Office\OFFICE11\Excel.exe" c:\students.xls
Is there a way to open just sheet 2?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Opening a specified sheet in an Excel file

Hi,

You can make sheet 2 the active sheet

Workbooks.Open Filename:="C:\student.xls"
Sheets("Sheet2").Select

Mike

"BarryHNZ" wrote:

I am wanting to open a specified sheet in an excel file using START, RUN
command

So far I can open the first sheet but this is probably by default using the
command
"C:\Program Files\Microsoft Office\OFFICE11\Excel.exe" c:\students.xls
Is there a way to open just sheet 2?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Opening a specified sheet in an Excel file

Mike, are you suggesting code like
"C:\Program Files\Microsoft Office\OFFICE11\Excel.exe" Workbooks.Open
Filename:="C:\student.xls"Sheets("Sheet2").Select

I cannot get it to work

"Mike H" wrote:

Hi,

You can make sheet 2 the active sheet

Workbooks.Open Filename:="C:\student.xls"
Sheets("Sheet2").Select

Mike

"BarryHNZ" wrote:

I am wanting to open a specified sheet in an excel file using START, RUN
command

So far I can open the first sheet but this is probably by default using the
command
"C:\Program Files\Microsoft Office\OFFICE11\Excel.exe" c:\students.xls
Is there a way to open just sheet 2?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Opening a specified sheet in an Excel file

Opening an XL file is an all or none proposition. You can not just open one
sheet. You must open the entire workbook. You could use code to make the
sheet the active sheet on open but that will require enabling macros or
having the security set to Low.
--
HTH...

Jim Thomlinson


"BarryHNZ" wrote:

I am wanting to open a specified sheet in an excel file using START, RUN
command

So far I can open the first sheet but this is probably by default using the
command
"C:\Program Files\Microsoft Office\OFFICE11\Excel.exe" c:\students.xls
Is there a way to open just sheet 2?

Reply
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
opening a file in Excel starts application but dose not open file Bob Shelton Excel Discussion (Misc queries) 1 July 2nd 08 07:51 PM
HOW TO LOCK/STOP THE OPENING OF 1 SHEET AMONG 3 IN 1 EXCEL FILE? Excel Locker[_2_] Excel Discussion (Misc queries) 1 September 20th 07 06:54 PM
Opening file in Excel 2003 opens multipule instances of same file Ed_B Excel Discussion (Misc queries) 1 June 21st 07 07:10 PM
Spread sheet calculating/not calc from opening file differently JimR Excel Worksheet Functions 0 January 16th 07 05:34 PM
opening an excel file opens a duplicate file of the same file skm Excel Discussion (Misc queries) 1 December 7th 05 05:52 PM


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

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"