+ Reply to Thread
Results 1 to 6 of 6

Hide and safely password protect 2nd tab of Excel file

  1. #1
    Registered User
    Join Date
    06-12-2021
    Location
    Montreal, Canada
    MS-Off Ver
    Office 365
    Posts
    49

    Hide and safely password protect 2nd tab of Excel file

    Good day,

    I have a file with 2 tabs, I want to hide and password protect the 2nd tab (called detail) from viewing.

    I have used the alt-F11 and modified the visible to reflect the -2 - xlSheetHidden and use protect with a password. That works if the person who will be receiving the file does not know how to make the tab visible again.

    Is there a way to make the tab invisible and stay invisible unless the password is used?

    Tx

    Yves
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,093

    Re: Hide and safely password protect 2nd tab of Excel file

    You need to password protect the VBA Project.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    06-12-2021
    Location
    Montreal, Canada
    MS-Off Ver
    Office 365
    Posts
    49

    Re: Hide and safely password protect 2nd tab of Excel file

    Tx for the suggestion. I have tried that but I can still acces and change the visibilty of the second tab. It can't be edited but I can see the data.

    Yves

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,093

    Re: Hide and safely password protect 2nd tab of Excel file

    You can make the tab "very hidden", in which case you can't unhide it by right-clicking on a visible tab. You can only unhide it in the VBE. Password protecting the VBA Project means that it cannot easily be unhidden.

    Locking and/or hiding formulae is only effective if the worksheet is protected, with or without a password.

    If you just hide the worksheet, there is nothing to ask for a password when you try to unhide it.

    So, the sheet may be visible and protected but that means the data can be seen, though not necessarily any formulae (if you have chosen to hide them).

    You could, perhaps, select a cell way beyond the visible data so that, if the sheet is unhidden, there's nothing to see. And maybe hide the column and row headers so that it's not obvious that's what you've done.

    Interesting challenge.

  5. #5
    Registered User
    Join Date
    06-12-2021
    Location
    Montreal, Canada
    MS-Off Ver
    Office 365
    Posts
    49

    Re: Hide and safely password protect 2nd tab of Excel file

    I have found this solution which seams to work:

    Open the excel file
    Hide the tabs I want to hide
    Click on file->info click on Protect Workbook.
    A scroll down menu will appear, select Protect Workbook Structure,
    enter a Password. Save the file.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,093

    Re: Hide and safely password protect 2nd tab of Excel file

    Glad you found a solution. And thanks for sharing it with us.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VB Code to password protect the excel file
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-07-2015, 08:27 AM
  2. Replies: 2
    Last Post: 01-17-2013, 08:39 AM
  3. Password Protect Excel File
    By akynyemi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-16-2013, 09:03 AM
  4. password protect excel file deletion
    By ag273n in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-04-2013, 06:46 PM
  5. VBA to Unprotect (w/ password), Unhide, Hide, and Protect (w/ password)
    By pger34 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-14-2012, 12:35 PM
  6. Hide Excel Sheets on Opening and Password Protect There Viewing
    By Divardo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-01-2009, 06:10 AM
  7. [SOLVED] Password protect an excel file?
    By in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-28-2009, 10:53 AM

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