Save as and file exists.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am running some code to save a file. I am passing the filename as a variable (not important really)

However I want to be able to invoke some action if the file exists. In particular action to respond to the No and Cancael options from dialog

What do I add to my code to do this

Barr

afID = Worksheets("Form-E").Range("J1"
myPath = ThisWorkbook.Path & "\My PAFs\" & PafID & ".xls

ActiveWorkbook.SaveAs Filename:=myPath, FileFormat:=
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
, CreateBackup:=Fals
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top