+ Reply to Thread
Results 1 to 9 of 9

Password for Dropdown List?

  1. #1
    Registered User
    Join Date
    07-06-2014
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    5

    Password for Dropdown List?

    Hi,

    I have a spreadsheet where I use a Validation List to select a user and insert an image associated with that user. I use the Validation List which has a name manager field with reference [=INDEX(Sheet1!$A$2:$B$6,MATCH(Sheet1!$E$2,Sheet1!$A$2:$A$6,0),2)] which has the names and images.
    I would like to add a password protection to this as in \excel-general/744273-password-for-dropdown-list.html and have tried the solution from JBeaucaire but when I download the example solution, it does not work for me. I have enabled macros, and can see the macro within the file.
    The end result of this would be that a user can select his image when entering his password, but nobody else's image, also users cannot be able to copy the images, after they appear in the spreadsheet.

    Sample file shows List range A2:B4 and List dropdown at E2, with output to F2, although the source data may be on a different sheet in the final version.

    Any Ideas what I am doing wrong?



    Thanks
    Attached Files Attached Files
    Last edited by Capins; 03-09-2023 at 09:12 PM. Reason: Add Example file

  2. #2
    Forum Contributor NewYears1978's Avatar
    Join Date
    03-15-2010
    Location
    Forney, TX
    MS-Off Ver
    Excel 2016
    Posts
    962

    Re: Password for Dropdown List?

    The sample you mentioned works for me just fine, and I modified it in your file and that also works.

  3. #3
    Registered User
    Join Date
    07-06-2014
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    5

    Re: Password for Dropdown List?

    Thanks for doing that, it works for me as well now.

    I added some code I found to protect the cells from editing or copying after the change, which makes it secure.

    Please Login or Register  to view this content.
    Unfortunately it comes up with an error when trying to put both sets of Code for the same worksheet. They each work when on individual worksheets.

    I think I have wrong syntax or not adding second sub correctly.

    Thanks
    Last edited by FlameRetired; 03-14-2023 at 06:51 PM.

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,396

    Re: Password for Dropdown List?

    Administrative Note:

    Capins,Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)

    As you are new to the forum I will do it for you this time.
    Dave

  5. #5
    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,091

    Re: Password for Dropdown List?

    Unfortunately it comes up with an error when trying to put both sets of Code for the same worksheet. They each work when on individual worksheets.
    You can't have two subroutines/modules with the same name. I'm guessing you have just copied the whole routine, header included. You would need to combine the code into one Worksheet_Change event handler.
    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


  6. #6
    Registered User
    Join Date
    07-06-2014
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    5

    Re: Password for Dropdown List?

    Hi Dave,

    My Apologies for missing the correct way of uploading code, I shall remember for next time, and thanks for correcting my error.

  7. #7
    Registered User
    Join Date
    07-06-2014
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    5

    Re: Password for Dropdown List?

    Hi Trevor,
    I now have code

    Please Login or Register  to view this content.
    This opens the image file before entering the password (not sure why) , and then locks the page so it cannot be edited. Is there a cleaner way to list the code, or does it not make a difference?

    Thanks

  8. #8
    Forum Contributor NewYears1978's Avatar
    Join Date
    03-15-2010
    Location
    Forney, TX
    MS-Off Ver
    Excel 2016
    Posts
    962

    Re: Password for Dropdown List?

    Can you tell me what exactly you are trying to do no the second part? You're trying to make it so once they have logged in (or selected their name and entered their PW) that Columns E2:F2 can no longer be edited?

  9. #9
    Registered User
    Join Date
    07-06-2014
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    5

    Re: Password for Dropdown List?

    Hi,
    The idea is that once the user has made the selection, it cannot be changed (or copied) by another user that may open the worksheet. There is more than one worksheeet, so it is only specific to each worksheet. Other users may be able to edit other worksheets, but once they have done so, that worksheet would lock as well.

+ 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. Password for Items in a Dropdown List
    By Ceceley in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-21-2020, 05:08 PM
  2. Select Name from Dropdown List and Password Validation
    By zulfaizan in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 12-04-2017, 12:48 AM
  3. [SOLVED] Need password for dropdown list in protected workbook
    By abenny11 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-05-2015, 02:52 PM
  4. [SOLVED] Dropdown list with password for a whole column
    By pol04 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-29-2015, 07:53 PM
  5. Excel macro dropdown list password
    By aleks86 in forum Excel General
    Replies: 0
    Last Post: 12-10-2013, 05:48 AM
  6. Request password from a dropdown list selection
    By tantcu in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-01-2013, 04:27 AM
  7. [SOLVED] Password for Dropdown List?
    By phaiz_nova87 in forum Excel General
    Replies: 7
    Last Post: 08-29-2013, 01:25 PM

Tags for this Thread

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