Attend Excelapalooza
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
    557
    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
    10,251
    Post Thanks / Like
    Mentioned
    194 Post(s)
    Tagged
    10 Thread(s)

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

    Use WorkBook protection
    - Posting guidelines, forum rules and terms of use
    - Try searching for your answer first, see how
    - Read the FAQs
    - List of BB codes

    Running Office 2003 & 2013 on Win 7

  3. #3
    Board Regular
    Join Date
    Apr 2009
    Posts
    557
    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,365
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    4 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
    557
    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
    557
    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...

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
  •  

 

DMCA.com