Use HELP in
Access. (Because the HELP in Excel is woefully inadequate! But the fundamentals of VBA are the same in all the Office products.)
Click on "Table of Contents".
Click on "Microsoft Visual Basic Documentation"
Click on "Visual Basic Language Reference"
Click on "Statements"
Click on "A-L"
Click on "Declare Statement"
Read.
Read especially the "Remarks". Including this:
Quote:
quote:
Remarks
...
Empty parentheses indicate that the Sub or Function procedure has no arguments and that Visual Basic should ensure that none are passed.
...
|
So NOW try using
Code:
Public Declare Function FileExists Lib "scrrun.dll" (path As String) As Boolean
And see if it works.
[Untested by me! Just reading the docs, period!]