How do I open a file in excel from access using vba

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I can open excel.exe using the shell function, but I want to open a excel
file in My Documents at the same time. I want to go directly into the file
and not have to use the file open on the toolbar in excel
 
You can do that right within the SHELL function, like this:
For example, Shell ("EXCEL c:\Test.xls")

You'll have a little trouble with "My Documents" because of the space. So
you need to put quotes within quotes, like this:
SHELL ("EXCEL ""c:\My Documents\Append.xls""")

--
Dominic Olivastro
CHI Research, Inc

web: http://www.ChiResearch.com
fax: 1-856-546-9633
voice: 1-856-546-0600 (ext 224)
email: (e-mail address removed)
 
Back
Top