Results 1 to 2 of 2

Thread: Delete Message

  1. #1
    Star Lounger
    Join Date
    Jan 2002
    Houston, Texas, USA
    Thanked 0 Times in 0 Posts
    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.


    Dea Friloux

  2. #2
    3 Star Lounger Jim Cone's Avatar
    Join Date
    Feb 2002
    Portland, Oregon, USA
    Thanked 3 Times in 3 Posts
    Application.DisplayAlerts = False
    ' Your code
    Application.DisplayAlerts = True

    Also, add... Application.DisplayAlerts = True to your error handler.
    Jim Cone
    Portland, Oregon USA

Posting Permissions

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