View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
lwm lwm is offline
external usenet poster
 
Posts: 38
Default Cancel Button on file save

Using this code


NewName = InputBox(prompt:="File Name and Directory", Default:=FName)

ActiveWorkbook.SaveAs Filename:=NewName, _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False, AddToMru:=True

When the user presses the cancel key the macro fails. What do I add to get
it to just end the sub.

Thanks