How can I automatically overwrite a file in VB

  • Thread starter Thread starter Randy R Cooper
  • Start date Start date
R

Randy R Cooper

I have a program that saves an excel file, but it always pops up a
message box that asks if I want to save over an existing file. Is
there a way around this programatically?
 
* (e-mail address removed) (Randy R Cooper) scripsit:
I have a program that saves an excel file, but it always pops up a
message box that asks if I want to save over an existing file. Is
there a way around this programatically?

\\\
With Application
.DisplayAlerts = False
ThisWorkbook.SaveAs("D:\file.xls")
.DisplayAlerts = True
End With
///
 
HI,

I do not know if is it that you are looking for, but if you are usins a StreamWriter, it has a Append Property, It worked for me when I tryede to overwrite an html file.

I hope that helps,
 
Back
Top