View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default A double check, please

I see, not really what you asked <bg

Further clarification on Application then. The Application object refers to
the VBA host application, be that Excel, Word or whatever. So when run on
the Excel application (which doesn't necessarily mean in Excel),
Application.Path refers to the Excel.exe directory, on Word it is the
Word,exe directory (which may not be the same). Also, remember that each
product will install other files in related directories, such as XLStart,
Addins, etc., so it can get complex, especially as MS moved to using
Documents and Settings.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Stuart" wrote in message
...
Thanks.
I do generally try...... well, try the ng, perhaps <g,
but here I was not at all sure what Application.path
means.....and I'm not sure I do now.

eg, if a user has a suite of Office applications installed, then if the

code
is run from Word, where does the path point to? and if from Excel?
Presumably if only Excel is installed, then it would point to wherever
Excel.exe is installed?

Code was not the issue for the op, but what exactly
Application.path might point to.

Regards.

"Bob Phillips" wrote in message
...
The only comment I would (gently) make is, why ask, why not just try and
find out for yourself. A bit of testing will prove the answer, and you
will
learn more than just by being told.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Stuart" wrote in message
...
If I say:
If Len(Dir(Application.Path & "\" & "abc.exe")) _
= 0 Then
Exit Sub
Else
etc
End If

Can I reliably assume that Exit Sub will only occur if the file

'abc.exe'
is
not found in the Office-installed path?
...not a trick question, just wish to know what I can be sure of, if I

make
the statement.

Regards.