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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

checking for files in excel 97 macros

Status
Not open for further replies.

darronb

Technical User
Feb 8, 2002
67
GB
Could someone please advice me on a bit of code to run in a macro that will check for the existance of 3 other excel spreadsheets before the macro trys to open them.

thanks.
 
Like duh, Excel 97 is so yesterday. It's not even supported by Microsoft anymore

Try

If Dir("T:\Apps Support\RELOGS\Call Analysis.xls") <> "" Then ' the file exists, returns "" (empty string) if the file doesn't exist.
MsgBox "File Exists"
Else
MsgBox "File does not exist"
End If


B.M.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top