Question
May 18, 2007 at 02:59 AM
dcleary

Excel 2003 macro query – overwrite save command needed.

by dcleary . Updated 19 years, 5 months ago

Hello

I’m trying to create an overwrite save command within MS Excel 2003.

I’m saving the active work book as a new file:

ActiveWorkbook.SaveAs FileName:=”c:\Test\testfile.csv”

I need to run this macro on a regular basis and sometimes the file will be already held in the location above and sometimes it won’t be.

When I run it, if the file already exists it prompts me to overwrite it, but I want it to do this it automatically rather than prompt me.

I’ve tried sticking an SaveChanges:=True at the end on the command but it doesn’t like this at all…..!!

Can anybody advise if this can be done within an excell macro and how, I’m sure it can be, but I just can’t figure it out.

Thanks

This discussion is locked

All Comments