+ Reply to Thread
Results 1 to 17 of 17

pass code for each employee

  1. #1
    Registered User
    Join Date
    07-25-2017
    Location
    Oiho
    MS-Off Ver
    2010 standard
    Posts
    90

    pass code for each employee

    I currently have the following code that asks for a pass code. I was wondering how can I modify this code where each employee has individual pass code.



    Please Login or Register  to view this content.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,775

    Re: pass code for each employee

    You could create a sheet with a list of passwords in column A. Make the sheet veryhidden so it can't be seen. Then have your macro compare the entered password to the list in the hidden sheet and if the password is found, execute the remainder of the code.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    07-25-2017
    Location
    Oiho
    MS-Off Ver
    2010 standard
    Posts
    90

    Re: pass code for each employee

    Mumps1,
    Thanks for your reply. That is one way of doing it...I will look into that.

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,775

    Re: pass code for each employee

    If you need help, post a copy of your file with a detailed explanation of what you want to do.

  5. #5
    Registered User
    Join Date
    07-25-2017
    Location
    Oiho
    MS-Off Ver
    2010 standard
    Posts
    90

    Re: pass code for each employee

    Mumps1,
    I am trying your suggestion with having a sheet with all the pass codes on it in column C. I cant seem to be able to modify my code to have it check for correct code entered.
    Please Login or Register  to view this content.

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,775

    Re: pass code for each employee

    Try this macro. I am assuming that the sheet with the pass codes in column C is named "Sheet2". Change this name in the code to suit your needs.
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    07-25-2017
    Location
    Oiho
    MS-Off Ver
    2010 standard
    Posts
    90

    Re: pass code for each employee

    Mumps1,
    Works like a charm. Thanks so much.

  8. #8
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,775

    Re: pass code for each employee

    You are very welcome.

  9. #9
    Registered User
    Join Date
    07-25-2017
    Location
    Oiho
    MS-Off Ver
    2010 standard
    Posts
    90

    Re: pass code for each employee

    Mumps1,
    I sent you a private message. Did it go through? I have never tried to send one before.

  10. #10
    Registered User
    Join Date
    07-25-2017
    Location
    Oiho
    MS-Off Ver
    2010 standard
    Posts
    90

    Re: pass code for each employee

    Mumps1,
    I'm sorry I forgot to say, on the sheet with the pass codes "Sheets(4)" that are in column C, in column B is the users names.Is it possible that what ever pass code that is entered (If it is in column C) can we select the name in column B and put that name onto sheets(2) column CC?

  11. #11
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,775

    Re: pass code for each employee

    Do you simply want to add the name on the first available cell in column CC of Sheets(2) to keep a running list of everyone who enters a code or do you just want to keep the last user's name in cell CC1

  12. #12
    Registered User
    Join Date
    07-25-2017
    Location
    Oiho
    MS-Off Ver
    2010 standard
    Posts
    90

    Re: pass code for each employee

    on that sheet I will have to do activecell.offset(0,?).select
    then have activecell = the name of the user.

  13. #13
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,775

    Re: pass code for each employee

    I'm not sure what you mean. Are you saying that you have additional code (activecell.offset(0,?).select) which will determine where the name of the user will go? What determines what number goes in place of the question mark. Please explain in detail what you are trying to do.

  14. #14
    Registered User
    Join Date
    07-25-2017
    Location
    Oiho
    MS-Off Ver
    2010 standard
    Posts
    90

    Re: pass code for each employee

    Sorry,
    On sheet(2) the activecell is A1. (what row is determine earlier in the code) I will offset the active cell (0,80) then make that active cell = the users name

  15. #15
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,775

    Re: pass code for each employee

    Try:
    Please Login or Register  to view this content.
    You don't need to use activecell.offset(0,80). We can simply use a direct reference to cell CC1.

  16. #16
    Registered User
    Join Date
    07-25-2017
    Location
    Oiho
    MS-Off Ver
    2010 standard
    Posts
    90

    Re: pass code for each employee

    worked just like I wanted it to. Thanks. Your the best.

  17. #17
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,775

    Re: pass code for each employee

    My pleasure.

+ 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] VB Code to pass varaible
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-23-2017, 03:25 PM
  2. [SOLVED] Help with the code to pass a variable into the command syntax
    By rv02 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-22-2016, 05:05 PM
  3. [SOLVED] VBA code will not let me pass to next cell
    By Wouldsman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-12-2015, 08:30 AM
  4. [SOLVED] Help with VB Code to pass a selection to another workbook's slicer
    By rv02 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-08-2015, 01:11 AM
  5. [SOLVED] Pass Variable in VB Code
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-05-2013, 04:49 AM
  6. Replies: 3
    Last Post: 06-07-2012, 07:25 PM
  7. [SOLVED] Analyze Within An Array and Pass Back Once vs. Pass at each applicable Instance
    By AlvaroSiza in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-11-2012, 05:25 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