+ Reply to Thread
Results 1 to 6 of 6

password protect to view sheets without affecting connection

  1. #1
    Registered User
    Join Date
    04-05-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    56

    password protect to view sheets without affecting connection

    Hi

    I want to hide a sheet, so that the user would be able to view it after entering a password. this is as I have data that the user should be able to view alone.

    I know I can just add a password protection, but I have a get data from that excel file (power query connection) that pulls data from that spreadsheet into another spreadsheet and if I add a password to it, it will mess up the connection.

    Can anyone help me add a protection (welcome sheet asking for password to view remaining sheets) but not affecting the connection at the same time.
    Last edited by fawnlemur; 04-20-2022 at 06:03 PM.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,650

    Re: password protect to view sheets without affecting connection

    Try such code in Thisworkbook module.
    You shall have WELCOME SCREEN sheet in the workbook (can be normally hidden or very hidden).
    It wouild be wise also to add Workbook BeforeSave event handler that (when workbook is opened with a password and worked normally) it saves it with only Welcome Screen sheet visible and other sheets hidden
    Please Login or Register  to view this content.
    Last edited by Kaper; 04-05-2022 at 05:00 AM.
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    04-05-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    56

    Re: password protect to view sheets without affecting connection

    Hi, Thank you for this, I was looking for something like this.

    I've done the above, but when I go on another spreadsheet and try to get data from this spreadsheet (via power query Connection) I can only see the welcome sheet and can't see the other sheets to make a connection with.

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,650

    Re: password protect to view sheets without affecting connection

    For the time of the preparation of the query you need all sheets visible.
    Then, once query has been set up, it will work (refresh) even with hidden sheets.

  5. #5
    Registered User
    Join Date
    04-05-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    56

    Re: password protect to view sheets without affecting connection

    Thank you

  6. #6
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,650

    Re: password protect to view sheets without affecting connection

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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] Protect all sheets without using a password
    By SallyPoyzer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-10-2018, 08:09 PM
  2. Replies: 1
    Last Post: 05-27-2014, 02:40 PM
  3. Protect/Un-protect multiple sheets with password using VBA
    By Max_excel in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-22-2013, 02:59 AM
  4. [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
  5. Replies: 12
    Last Post: 01-21-2012, 12:40 PM
  6. [SOLVED] Password protect for view only
    By Kathy in forum Excel General
    Replies: 2
    Last Post: 04-05-2006, 12:10 PM
  7. View limited sheets in workbook based on logon/password protect
    By Nicole Seibert in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-06-2006, 05:50 PM

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