Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    milton keynes, Buckinghamshire
    Posts
    252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    save and overwrite (2000)

    I need to save a file and, if one already exists, overwrite an existing version which has the same name. My current code looks like this:

    ActiveWorkbook.SaveAs ("Documents and SettingsapergunasMy Documents" & ProjectName)

    ActiveWorkbook.Close
    ThisWorkBook.Activate

    Can you please advise what I need to add so as to make this work.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: save and overwrite (2000)

    Insert a line Application.DisplayAlerts = False above the line with SaveAs, and a line Application.DisplayAlerts = True below it. This will suppress the question whether you want to overwite the file.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •