P
Paul Johnson
I am using the built-in Dir() function to check for the existence of a file
when opening the application. The code is simply
If Dir(FilePathAndName) = "" Then
' Code to run when file is not found...
This works fine until, for example, I take the application file from one
machine where "D:" is my thumbdrive and run it on another machine where "D:"
is my CD-ROM, or if the last data file was on a floppy disk in drive "A:"
When the code hits the line with the Dir() statement, it gives a "Disk or
Network Error" message. I guess I could build in error-trapping to work
around that event, but I wonder if there is a more elegant way to get around
this obstacle. Any suggestions?
TIA
Paul Johnson
when opening the application. The code is simply
If Dir(FilePathAndName) = "" Then
' Code to run when file is not found...
This works fine until, for example, I take the application file from one
machine where "D:" is my thumbdrive and run it on another machine where "D:"
is my CD-ROM, or if the last data file was on a floppy disk in drive "A:"
When the code hits the line with the Dir() statement, it gives a "Disk or
Network Error" message. I guess I could build in error-trapping to work
around that event, but I wonder if there is a more elegant way to get around
this obstacle. Any suggestions?
TIA
Paul Johnson