Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open an excel file...

Status
Not open for further replies.

Fursten

Programmer
Dec 27, 2000
403
PT
Hi,

From Visual Basic I´m trying to open an excel file. I would like to use something like the shell command(only works for executables) instead of create object function... becuase I don´t want to need to make reference to excel object library...

Thank you in advance,

Sergio Oliveira
 
Look up the ShellExecute api call. It allows you just to specify a file name that you wish to open, letting the registry work out which EXE to use and where to find it.

Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long


M :)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top