View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
BarryHNZ BarryHNZ is offline
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?