Macro to "SaveAS" File to Same Name


Posted by Kathy on October 02, 2000 3:31 AM

I have to Save a file to the "Same Name".
For Example when using macro code
ActiveWorkbook.SaveAs FileName:="C:\My Documents\ADCADJ99.csv", FileFormat _
:=xlCSV, CreateBackup:=False
The Window box opens and tells me name already exists
do I want to replace it? I have to manually type "yes".
I tried putting DisplayAlerts = False before
the Save as command.

Is there a way I can make the "macro" reconize "yes" replace the file?

Posted by Ivan Moala on October 02, 2000 3:39 AM

Kathy this should have worked ?? ie displayalerts

Have you done it correctly ?? eg

Application.DisplayAlerts = False
ActiveWorkbook.SaveAs FileName:="C:\My Documents\ADCADJ99.csv", FileFormat _
:=xlCSV, CreateBackup:=False
Application.Displayalerts=True

should work ??

Ivan



Posted by kathy on October 02, 2000 3:46 AM