Saveas problem


Posted by Paul on August 07, 2001 5:28 PM

I am trying to write a macro to bring up the saveas dialog box, force the user to enter a name for the file and click save. If the file already exists then I want to it OVERWRITE it automatically without the warning dialog bow appearing that warns that the file already exists. Any ideas?

Posted by Malc on August 07, 2001 6:58 PM

Use an input box to get a file name and add .xls on the end. rather than use the save as dialog box as it when it's calle in a macro it doesn't save as.
Something like
Application.displayalerts=false ' Allows overwrite without a warning
do while FileName = "Enter a File Name"
FileName = InputBox("Enter a File name", "Saving your file", "Enter a File Name")
loop
FileName = left(FileName,6) & ".xls"
SaveAs Filename:=FileName



Posted by Paul on August 11, 2001 9:08 AM


Thanks Malc.I used this type of macro and built it into a functional solution. Cheers