View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
SJW_OST[_2_] SJW_OST[_2_] is offline
external usenet poster
 
Posts: 39
Default Replace file without being prompted to save

You guys are AWSOME!!!
Thank you, that works perfectly!

"Jim Thomlinson" wrote:

You want to temporarily suspend alerts as follows...

Application.displayalerts = false

ActiveWorkbook.SaveAs Filename:= _
"H:\Shortcuts&Links\M Y P R O J E C T
S\NationalSummary\DPR_National_Summary_Daily.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

Application.displayAlerts = true
--
HTH...

Jim Thomlinson


"SJW_OST" wrote:

I use this code to save over a file with new info;

ActiveWorkbook.SaveAs Filename:= _
"H:\Shortcuts&Links\M Y P R O J E C T
S\NationalSummary\DPR_National_Summary_Daily.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

I get prompted that the file already exists and do I want to replace the
file by saving anyway. I do want to save anyway each and every time. What
code can I include to automatically save and replace the file without being
prompted?

Your help is greatly appreciated.