validate a directory or file exits
How do I validate if a file exists without using On Error Resume Next then
trying to open it? |
validate a directory or file exits
if dir("C:\Myfolder\Myfile.xls") = "" then
msgbox "It doesn't exist" exit sub Else workbooks.Open c:\Myfolder\Myfile.xls" End if -- Regards, Tom Ogilvy "Simon Shaw" wrote in message ... How do I validate if a file exists without using On Error Resume Next then trying to open it? |
All times are GMT +1. The time now is 09:31 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com