+ Reply to Thread
Results 1 to 15 of 15

Select Name from Dropdown List and Password Validation

  1. #1
    Registered User
    Join Date
    01-17-2012
    Location
    Kuala Lumpur
    MS-Off Ver
    Excel 2010
    Posts
    23

    Question Select Name from Dropdown List and Password Validation

    I have been asked to create password protected dropdown list by using data validation. Input from (WORKBOOK - Approval).

    Basically, all I need is to come up with a unique password for each name for listed in the "Name" in WORKBOOK - Approval

    Whenever I click on it, it will prompt me to enter password from WORKBOOK - Credentials.

    Different names requires different password, otherwise it will return as a blank cell.

    I really don't have any clue how to resolve after a few trial. Attached herewith excel files for your ref.
    (I created TWO WORKBOOK Name in ONE Files)

    I really appreciate if any of people here can help me with this, as I'm new to Excel programming.

    Also, kindly show me the steps how to edit data validation if possible.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Select Name from Dropdown List and Password Validation

    Hi zulfaizan

    Can you clarify:

    1. "Whenever I click on it" - what is "it"? (cell?, button?)

    2. When the name is selected from the dropdown H7, where is the password being entered - do you want a pop up box for this?

    3. Should the input of the correct password trigger addition of signature?

    4. Should the input of the correct password automatically trigger status to change from "not approved" to "approved"?

    thanks
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  3. #3
    Registered User
    Join Date
    01-17-2012
    Location
    Kuala Lumpur
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Select Name from Dropdown List and Password Validation

    Hi Kev,

    Thank you for your response.
    Kindly find my answer below ...


    1. "Whenever I click on it" - what is "it"? (cell?, button?)
    Answer : Click on cell H7 . Dropdown list refer to different WORKBOOK which is WORKBOOK - Credentials.

    2. When the name is selected from the dropdown H7, where is the password being entered - do you want a pop up box for this?
    Answer : Yes, pop box perhaps. If wrong password from the list in WORKBOOK - Credentials, popup error message will be appear and dropdown list need to reselect again.

    3. Should the input of the correct password trigger addition of signature?
    Answer : Input when correct password trigger : Name , department/division and signature images will be capture from WORKBOOK - Credentials list and appear in WORKBOOK Approval.

    Reason why i create two workbook as follows:
    a) WORKBOOK - Approval : user will download the form of approval and keep with them (desktop/notebook).
    b) WORKBOOK - Credentials : i can manage by myself and keep update the list if approval name,password, dept and signature information.


    4. Should the input of the correct password automatically trigger status to change from "not approved" to "approved"?
    Answer : No. Click manually.


    Your assistance is highly appreciated.
    Thank you.

  4. #4
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Select Name from Dropdown List and Password Validation

    Reason why i create two workbook as follows:
    a) WORKBOOK - Approval : user will download the form of approval and keep with them (desktop/notebook).
    b) WORKBOOK - Credentials : i can manage by myself and keep update the list if approval name,password, dept and signature information.
    Potential issue here
    - to access any data in file Credentials VBA requires path to that file to be available
    - is the user connected to the server when "approving"?

  5. #5
    Registered User
    Join Date
    01-17-2012
    Location
    Kuala Lumpur
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Select Name from Dropdown List and Password Validation

    Potential issue here
    - to access any data in file Credentials VBA requires path to that file to be available ( answer : perhaps you can help)
    - is the user connected to the server when "approving"? (answer : join domain/network)

    1) My intention was, when "BOSS" want to approve, he/she will click at cell H7 to select the name.
    2) When he/she click, password box will popup request for the password. (cross check with credentials information at WORKBOOK - Credentials)
    3) After password validation process done... name,dept, and signature image appear according to password given.

    Maybe we can lock cell for department and signature being enter manually.

    Btw, am i answer to your question ... sorry if i'm wrong.

  6. #6
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Select Name from Dropdown List and Password Validation

    - is the user connected to the server when "approving"? (answer : join domain/network)
    Are you saying that the user is logged in to the network
    - directly if in the office
    - or via VPN if out of the office?

    Is that correct?

  7. #7
    Registered User
    Join Date
    01-17-2012
    Location
    Kuala Lumpur
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Select Name from Dropdown List and Password Validation

    Are you saying that the user is logged in to the network
    - directly if in the office
    - or via VPN if out of the office?

    Is that correct?
    answer : yes, you're totally correct
    Last edited by zulfaizan; 11-24-2017 at 12:38 PM.

  8. #8
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Select Name from Dropdown List and Password Validation

    Ok - I will look at this for you during the next 48 hours

    We do not need a dropdown for the UserName
    - the user is logged in
    - default the name to UserName

    test in attached workbook with {CTRL} k
    Please Login or Register  to view this content.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    01-17-2012
    Location
    Kuala Lumpur
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Select Name from Dropdown List and Password Validation

    Quote Originally Posted by kev_ View Post
    Ok - I will look at this for you during the next 48 hours

    We do not need a dropdown for the UserName
    - the user is logged in
    - default the name to UserName

    test in attached workbook with {CTRL} k
    Please Login or Register  to view this content.

    Hi Kev,

    FYI, i preferred the approval name to be manage via dropdown list from WORKBOOK - Credentials. Ease to add, change or revoke the privilege.
    However, i really appreciate it for what you've suggested to me earlier. At the means time, i also looking at other alternative....

    Great to know you ....

  10. #10
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Select Name from Dropdown List and Password Validation

    I want to make the code as simple as possible for you and give you exactly what you want

    Let me explain better...

    Peter is the user name
    Peter opens workbook "Approval"
    The name in the box is Peter - why would he choose a different name?

    Next Peter enters a password
    This triggers file "Credentials" to open
    User name (Peter) checked in file "Credentials"
    If user name is valid then Password is checked
    If Password is correct then other details are added to sheet

    Is the name in H7 (in "Approval") the same as Windows UserName or is it different?
    Last edited by kev_; 11-27-2017 at 02:33 AM.

  11. #11
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Select Name from Dropdown List and Password Validation

    I attach an example using dropdown for names as requested

    Download attached workbooks
    - open Approval_v1 and amend this line (in sheet VBA) to match file location
    Please Login or Register  to view this content.
    - click on Begin
    - test with name "Mike" and password "Mike1"

    Does it do what you want?

    How it works
    A = Approval, C = Credentials

    - click on BEGIN to reset all values\ open C
    - dropdown updated
    - user selects name
    - password box appears
    - user enters password
    - password is checked
    - other values and signature fetched
    - C is closed

    Notes
    - sheet in C containing passwords is hidden as a precaution (xlVeryHidden)
    - images have been renamed pic_Mike etc to allow them to be copied without requiring LookUp
    (image names must be totally consistent in structure)
    - use made of worksheet-level named ranges to make referencing of cells easier in A
    ("TheDate","Designation","Password","Signature" & "UserName")

    Dropdown - are you really sure about this?
    To create a dropdown based on values in the other workbook requires 2 named ranges
    - Data Validation with formula: =ListOfNames (a named range in A)
    - ListOfNames with formula: =Credentials_v1.xlsm!NameList (a named range in C)
    - NameList with formula: =OFFSET(Credentials!$B$2,0,0,COUNTA(Credentials!$B:$B)-1,1)

    Workbook C is protected
    - modify and read passwords are both "password"
    - (because of above Named Range Link), if C is protected, then when A is opened Excel demands the user inputs password to allow links to be updated
    - VBA cannot be used to answer that message without opening C before A
    - problem avoided by breaking the link when file A is closed
    - Do you intend C to be protected?

    Avoid the above problem by not having a dropdown in A - it is unnecessary in my opinion
    - tomorrow I will provide a much simpler solution so that you can choose
    Attached Files Attached Files
    Last edited by kev_; 11-27-2017 at 12:40 PM.

  12. #12
    Registered User
    Join Date
    01-17-2012
    Location
    Kuala Lumpur
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Select Name from Dropdown List and Password Validation

    Quote Originally Posted by kev_ View Post
    I attach an example using dropdown for names as requested

    Download attached workbooks
    - open Approval_v1 and amend this line (in sheet VBA) to match file location
    Please Login or Register  to view this content.
    - click on Begin
    - test with name "Mike" and password "Mike1"

    Does it do what you want?

    How it works
    A = Approval, C = Credentials

    - click on BEGIN to reset all values\ open C
    - dropdown updated
    - user selects name
    - password box appears
    - user enters password
    - password is checked
    - other values and signature fetched
    - C is closed

    Notes
    - sheet in C containing passwords is hidden as a precaution (xlVeryHidden)
    - images have been renamed pic_Mike etc to allow them to be copied without requiring LookUp
    (image names must be totally consistent in structure)
    - use made of worksheet-level named ranges to make referencing of cells easier in A
    ("TheDate","Designation","Password","Signature" & "UserName")

    Dropdown - are you really sure about this?
    To create a dropdown based on values in the other workbook requires 2 named ranges
    - Data Validation with formula: =ListOfNames (a named range in A)
    - ListOfNames with formula: =Credentials_v1.xlsm!NameList (a named range in C)
    - NameList with formula: =OFFSET(Credentials!$B$2,0,0,COUNTA(Credentials!$B:$B)-1,1)

    Workbook C is protected
    - modify and read passwords are both "password"
    - (because of above Named Range Link), if C is protected, then when A is opened Excel demands the user inputs password to allow links to be updated
    - VBA cannot be used to answer that message without opening C before A
    - problem avoided by breaking the link when file A is closed
    - Do you intend C to be protected?

    Avoid the above problem by not having a dropdown in A - it is unnecessary in my opinion
    - tomorrow I will provide a much simpler solution so that you can choose


    Hi kev,

    thank you for your response and reply... :-)

    I will download and test... i cannot wait to test it.... tqvm in advanced.


    FYI,

    1) from my side, i don't want the credentials to be password protected bcoz limited user can access to the files.

    2) why i need the drop down list - feel free to choose but must with credentials. :-) . Approval can be anyone and they might be using desktop/laptop without joining domain. Only the network. Mostly approval who love travelling job.

    3) i fwd to you simple form as example ....

    Sorry if i did not provide you clear information. It is my fault.

    Scenario:

    a) User have to fill in information about their request and email the form for approval.

    b) User have to request approval from their bosses. This is where i need the name to be drop-down list (my idea). After approval key-in the password, cell will display information according to the credentials.

    c) Approval send back the form via email to the requester and requester (user) can attach in email and email to us directly. The form contains about request information and approval from their boss.

    d) My intention was, user and approval do not have to print out. Just email the form. Paperless .... On my side, i can manage the approval list if any changes to the structure later on...
    Attached Files Attached Files
    Last edited by zulfaizan; 11-27-2017 at 10:17 PM.

  13. #13
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Select Name from Dropdown List and Password Validation

    ok - will update thread later today

  14. #14
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Select Name from Dropdown List and Password Validation

    amended as follows
    - "Credentials" is NOT password protected
    - Data Validation Dropdown list is now created "live" (without using named ranges)
    - all named ranges removed
    - password userform removed
    - key values are copied into an array
    - array is looked up to return required values
    (matching password to array value provides a case sensitive match)
    - the coding is simplified as a result

    Is that more like what you want?
    Attached Files Attached Files
    Last edited by kev_; 11-28-2017 at 05:49 PM.

  15. #15
    Registered User
    Join Date
    01-17-2012
    Location
    Kuala Lumpur
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: Select Name from Dropdown List and Password Validation

    Quote Originally Posted by kev_ View Post
    amended as follows
    - "Credentials" is NOT password protected
    - Data Validation Dropdown list is now created "live" (without using named ranges)
    - all named ranges removed
    - password userform removed
    - key values are copied into an array
    - array is looked up to return required values
    (matching password to array value provides a case sensitive match)
    - the coding is simplified as a result

    Is that more like what you want?

    Hi Kev,


    Sorry.... Outstation for a few days ... :-) . Limitation of internet connection.

    Btw, thanks you for your helps and effort.
    I really really appreciate it....

    I already download and test the file ....
    Error : For i = 2 To UBound(CredentialsArray) 'Sheet Approval - Module1


    I also found 1 files and attach it here.... just to share some information. (Authentication)

    I am so sorry if i put you into trouble .....
    Attached Files Attached Files

+ 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] select multiple values from a cell data validation list dropdown
    By SKooLZ in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-23-2017, 08:15 PM
  2. [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
  3. Select item of a dropdown list (data validation) and refresh one pivot table
    By ATN123 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-17-2014, 07:40 AM
  4. [SOLVED] Select item of a dropdown list (data validation) and refreshes values of all pivot tables
    By siroco79 in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 03-06-2014, 05:35 AM
  5. Excel macro dropdown list password
    By aleks86 in forum Excel General
    Replies: 0
    Last Post: 12-10-2013, 05:48 AM
  6. [SOLVED] Password for Dropdown List?
    By phaiz_nova87 in forum Excel General
    Replies: 7
    Last Post: 08-29-2013, 01:25 PM
  7. Replies: 0
    Last Post: 08-22-2012, 03:52 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