Thanks Thanks:  0
Likes Likes:  0
Results 1 to 6 of 6

Thread: Protect a Tab so the Tab Can Not be Deleted

  1. #1
    Board Regular
    Join Date
    Apr 2009
    Posts
    628
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Protect a Tab so the Tab Can Not be Deleted

    Hello All,
    If I have a tab labeled "Home", how can I lock the tab so it will not be able to be deleted, with out simply hiding it? And, I still want to be able to work on the Home Worksheet, just not be able to delete it.
    Thanks
    excel 2013

  2. #2
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    15,316
    Post Thanks / Like
    Mentioned
    272 Post(s)
    Tagged
    22 Thread(s)

    Default Re: Protect a Tab so the Tab Can Not be Deleted

    Use WorkBook protection
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 2003 & 2013 on Win 7

  3. #3
    Board Regular
    Join Date
    Apr 2009
    Posts
    628
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Protect a Tab so the Tab Can Not be Deleted

    Quote Originally Posted by Fluff View Post
    Use WorkBook protection
    I tried this, however, it will not let the code run. For example, I have a command button to clear the worksheet template, to start with a brand new sheet, this code will no longer clear the sheet.
    Thanks

  4. #4
    MrExcel MVP shg's Avatar
    Join Date
    May 2008
    Location
    The Great State of Texas
    Posts
    20,985
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    7 Thread(s)

    Default Re: Protect a Tab so the Tab Can Not be Deleted

    The code can unprotect the workbook, so its thing, then re-protect.

  5. #5
    Board Regular
    Join Date
    Apr 2009
    Posts
    628
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Protect a Tab so the Tab Can Not be Deleted

    Quote Originally Posted by shg View Post
    The code can unprotect the workbook, so its thing, then re-protect.
    This is what I was thinking, code to unprotect at the beginning, and code at the end to protect. I just don't know the code with out running recorder.
    This is

  6. #6
    Board Regular
    Join Date
    Apr 2009
    Posts
    628
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Protect a Tab so the Tab Can Not be Deleted

    Quote Originally Posted by Guzzlr View Post
    This is what I was thinking, code to unprotect at the beginning, and code at the end to protect. I just don't know the code with out running recorder.
    This is

    Never Mind...

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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