View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ken Macksey Ken Macksey is offline
external usenet poster
 
Posts: 77
Default Excel VBA Save As

Hi

You could use

Application.DisplayAlerts = False

ActiveWorkbook.SaveAs ("Test saveas.xls")

Application.DisplayAlerts = True

which will force an overwrite. If you don't want to do that for fear of
overwriting a different existing file, you could use

Excel.Application.Dialogs(xlDialogSaveAs).Show

where you can change the saveas name or cancel without the error.



HTH



KenM