
Common Dialog (Saveas) Question
On Thu, 17 Jun 1999 07:57:30 -0400, "Travis Mitchell"
Quote:
>When using the "saves" function of the commondialog is there a way to
>prevent overwriting an existing file (only allow new files to be created)?
>Thanks for your help
>Travis
Travis try this CommonDialog.Flags=&H2
This will prompt the user if the file already exists
or :-
filenum=freefile
on error goto nofile
test if the file is present - if its not an error will be generated
open filename for input as #filenum
close #filenum
nofilepresent:
'what everelse from here on
exit sub
nofile:
if err=53 then goto nofilepresent
Hope this helps Chris