need advice with shell to excel from access 97

W

wayne zabel

I have a routine that shells to excel with the press of a button on my form.
I would like to hav e it open to a specific worksheet in a specific
workbook. As it stands now, it just opens to the basic excel opening screen
and the use has to brouse for his file. The file I need to open is always:
c:\bmc\weekly.xls
and the worsheet is always: chart1

Any help would be appreciated.
 
W

wayne

My current code is :
Call Shell("""C:\Program Files\Microsoft Office\Office\EXCEL.EXE""", 1)
The file I need to open is:
c:\bmc\weekly.xls
and the worsheet is always: chart1
 
C

Conrad

Wayne,
This is probably the easiest way I know.

Dim xl As New Excel.Application
With xl
.Visible = True
.Workbooks.Open "c:\bmc\weekly.xls"
End With
 
Top