Results 1 to 7 of 7

prevent deleting worksheet, set as xlVeryHidden enstead

Threaded View

  1. #1
    Registered User
    Join Date
    02-16-2009
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    5

    prevent deleting worksheet, set as xlVeryHidden enstead

    I would like to "Archive" any worksheet that has data beyond row 14 when a user tries to delete the sheet.

    I know in the ThisWorkbook code, I can edit what happens when a worksheet is added, by editing the sub "Workbook_NewSheet" and I was wondering if there is a way to do something similar for when sheets are deleted.

    I know, usually, when a sheet is deleted, a confirmation message is shown, asking if the user is sure they would like to delete the sheet. I would like to avoid showing that message, and show my own, asking if the user would like to "Archive" the sheet enstead. If they select yes, I would like set the sheet as xlveryhidden, and rename it to nameArchived. If no is selected, then delete message may be shown.

    Any suggestions?
    Last edited by MagicWIU; 02-27-2009 at 07:33 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1