View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
excelnut1954 excelnut1954 is offline
external usenet poster
 
Posts: 175
Default How to prevent error message during macro

I have a simple macro to Save-As the workbook. If the workbook already
exists where its suppose to save to, then naturally a dialog box comes
up asking if I want to overwrite the file. If the user clicks NO, then
run-time erorr 1006 comes up
"Method 'Save-As' of object '_ workbook' failed."

Can I add code to just ignore the error and continue on?

Thanks,
J.O.