How to find out the path to excel.exe thru vb

S

sentiboy

Hi All,

Can any body tell me how to extract the path of excel.exe installed on
my computer thru vb 6.0.


by
Sentimental
 
J

Jim Cone

Sentimental,
I don't have classic VB, but this should work...
'---------------------------
Sub GetExcelPathFromVB()
Dim appXL As Object
Dim s As String
Set appXL = CreateObject("Excel.Application")
s = appXL.Path
MsgBox s
appXL.Quit
Set appXL = Nothing
End Sub
'------------
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


Hi All,
Can any body tell me how to extract the path of excel.exe installed on
my computer thru vb 6.0.
by
Sentimental
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top