+ Reply to Thread
Results 1 to 4 of 4

Conditional Password

  1. #1
    Registered User
    Join Date
    10-23-2011
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2007
    Posts
    6

    Conditional Password

    I do not have any idea if what I want is at all possible. here is what I want.

    I have a dropdown list from where I am to select months. Basis my selction I will be able to view some other data by means of vlookup. now, when I select a particular month (say october) I want the system to ask for a password to continue and display relevant data. The password would be asked only for that month, for the other months the vlookup would return relevant data.

    Can anyone please help??
    Last edited by subhs82; 10-28-2011 at 05:05 PM. Reason: issue resolved
    SUBHS

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Conditional Password

    subhs82,

    What you're asking for would require VBA, which means in order to use the workbook properly, macros must be enabled. Attached is an example workbook based on the criteria you provided. When October is selected a userform pops up asking for a password (the default password is just "password" no quotes). It will not show the data unless the correct password is entered.

    The month data is setup on a xlVeryHidden worksheet named 'Data'. xlVeryHidden means that you cannot unhide it outside of the Visual Basic Editor.

    To access the Visual Basic Editor, use the keyboard shortcut ALT+F11. In there you can see the userform and all code used to perform the actions. Also, 'Sheet1' is password protected to prevent editing. The sheet protection password is just "123" no quotes.
    Attached Files Attached Files
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    10-23-2011
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Conditional Password

    This is exactly the type I was looking for...THAAAAAAAANK YOU soooooooo much. Let my try and put this into the main file. If any trouble happens, will let you know, else will close this thread as resolved. Thank you once again.

  4. #4
    Registered User
    Join Date
    10-23-2011
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2007
    Posts
    6

    Thumbs up Re: Conditional Password

    THANKS A TON Tigeravatar !!!! You made my day.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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