• Delete Message

    Author
    Topic
    #469844

    My workbook has two worksheets. One is used to record the day’s activities and is named “In-Out”. The other sheet (Sheet1) is a clean sheet that will replace the In-Out sheet each day. I’ve written a macro entitled “Refresh” which deletes the In-Out sheet, copies Sheet1 and renames it “In-Out”. The macro is called “Refresh” and is assigned to the Menubar . At the end of each day, the user clicks the Refresh button and the In-Out sheet is replaced with Sheet1. The macro actually works quite well, but, when it deletes the In-Out sheet, the following message appears: “Data may exist in the sheet(s) selected for deletion. To permanently delete the data, Press Delete.” The user then selects “Delete” or “Cancel” and everything runs as planned. How do I make this message not appear? I don’t want the user to have to do anything except click the “Refresh” command on the menubar.

    Regards,

    Dea Friloux

    Viewing 0 reply threads
    Author
    Replies
    • #1230546

      Application.DisplayAlerts = False
      ‘ Your code
      Application.DisplayAlerts = True

      Also, add… Application.DisplayAlerts = True to your error handler.
      ‘–
      Jim Cone
      Portland, Oregon USA
      http://tinyurl.com/SpecialSort

    Viewing 0 reply threads
    Reply To: Delete Message

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: