View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Harald Staff Harald Staff is offline
external usenet poster
 
Posts: 1,327
Default Say 'YES' to overwrite file

"Mike G." skrev i melding
...
I want my script to automatically reply "YES" when
prompted if I wish to overwrite a file.


No, you don't want the question there in the first place:

Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:=fsn
Application.DisplayAlerts = True

HTH. Best wishes Harald