+ Reply to Thread
Results 1 to 9 of 9

password protect sheets

  1. #1
    Registered User
    Join Date
    06-17-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    19

    password protect sheets

    Hello, is it possible to password protect sheets so that a lookup macro will still find information on the password protected sheets but users are not able to view or modify those sheets (but enable myself to unlock the sheets to update information and then re-lock them)?
    Last edited by Velmortis; 07-27-2013 at 05:19 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: password protect sheets

    Hello Velmortis,

    Yes you can. You will need to change the sheet Visible property to xlSheetVeryHidden. This will allow you to access the sheet through VBA code but keep it hidden from the user. Password protecting the sheet will prevent users from changing the sheet.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    06-17-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: password protect sheets

    Thanks Leith, works nicely. how would the same method work if as example, if I were to forward the workbook to another user (I have a running macro that enables the user to search for a particular set of data on one of the xlSheetVeryHidden) but I don't want them to be able to simply make the sheet hidden to view all the data on the page. (myself I would be required to update those pages weekly). I was thinking the password protect method would enable someone to simply run the macro to retrieve certain data required without access to the remainder of the information stored in the pages and I could just access those sheets and update accordingly. Or could I simply put a password feature on the page that contains the macro to prevent anyone from doing anything but run the macro but enable me via the password?

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: password protect sheets

    Hello Velmortis,

    If a sheet is xlSheetVeryHidden, the user can not unhide it from the Ribbon. It can only be done through the VBIDE.

    You could create a UserForm to allow certain individuals to access to these sheets' data.

  5. #5
    Registered User
    Join Date
    06-17-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: password protect sheets

    Hi Leith, Hopefully this will make more sense. As you can see by attached. Sheets 1-5 are hidden with only sheet 6 visible which runs the macro. When searching for a match via the combobox/textbox a result is displayed in the listbox field. However if I were to forward this to someone, they could easily go to the develop tab and make the pages 1-5 visible to see the full data that will be in those sheets. This is what I want to prevent but enable me to update those sheets if necessary. I was thinking with a password protect on the sheets, this would prevent anyone from viewing the full information in those sheets except myself (via password) when updates are needed.
    Attached Files Attached Files

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: password protect sheets

    Hello Velmortis,

    You can keep the VB project invisible by password protecting it.

    In the VB Editor click Tools > VBAProject properties... > Protection (tab)

  7. #7
    Registered User
    Join Date
    06-17-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: password protect sheets

    Thanks Leith! Worked like a charm. And here I thought I would need alot of coding lol. Much appreciated!

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: password protect sheets

    Hello Velmortis,

    You're welcome.

  9. #9
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: password protect sheets

    Hi Velmortis

    I failed to mention this in our conversations in your other thread...if you Password Protect the Workbook Users cannot unhide hidden sheets in the Workbook without the Password.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ 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] Password Protect All Sheets Except One.
    By mike1199 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-19-2012, 10:40 AM
  2. [SOLVED] Password protect and unprotect all sheets EXCEPT two named sheets
    By Ducatisto in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-29-2012, 05:43 AM
  3. Password Protect Multiple Sheets
    By Jonathan78 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 04-08-2011, 02:27 AM
  4. Password protect sheets in workbook
    By Querl in forum Excel General
    Replies: 2
    Last Post: 01-30-2011, 06:05 PM
  5. [SOLVED] password protect sheets
    By rufusf in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-07-2006, 05:40 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