MrExcel Publishing
Your One Stop for Excel Tips & Solutions

file open error

Posted by brian on January 17, 2000 7:42 AM

IN VBA if I request a file to be opened, and it does not exist
an error is reported. Is there a way to have VBA
automatically create a new file identical to the one
asked for?

I have tried On error goto ... but this will also run if
the file is found and consequently create a new file
that is the same and overwrite.

Posted by Chris on January 17, 2000 1:43 PM

Why does it run if the file is found? Make sure you have an exit sub above your error handler. It sounds like you're on the right track, post your code if you still can't get it to work.