SaveAs and Replace File

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I have to save an excel file, I'm using the saveas method in a vb6 application, and in the case of the file already esists, a message box appears..
I can Avoid this message box and save the file? or...I can get the value of the answer to this message box to manage the code

Thanks!
Milly
 
fName = "C:\Myfolders\Myfile.xls"
if dir(fName) <> "" then
' file exists, what do you want to do
Else
' file doesn't exist, what do you want to do
End if

--
Regards,
Tom Ogilvy

Milly said:
Hi!
I have to save an excel file, I'm using the saveas method in a vb6
application, and in the case of the file already esists, a message box
appears...
I can Avoid this message box and save the file? or...I can get the value
of the answer to this message box to manage the code?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top