Thread: Saveas
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dale Levesque Dale Levesque is offline
external usenet poster
 
Posts: 4
Default Saveas

By handle it I mean that if the user selects 'No'. The sub exits gracefully
without an error message.

Dale

"Bob Phillips" wrote in message
...
Dale,

What do you mean by handle it? If you are happy that the user can say no,
then there is nothing more to do.If you are not happy with this and insist
that it is saved, you could precede the SaveAs with

Application.DisplayAlerts = False

and then the question doesn't get asked. Reset to True afterwards.

--
HTH

-------

Bob Phillips
"Dale Levesque" <dale at dynamicwindows.com wrote in message
...
I'm using the following code to save a file.

ActiveWorkbook.SaveAs FileName:=fs_Path & "Data\" & ls_SmallSaveName

&
".xls", FileFormat:= _
xlNormal, Password:="", writerespassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False

A dialog box comes up if the file already exists asking whether to

replace
it.

How can I handle it if the user says 'No'?

Thanks,

Dale