+ Reply to Thread
Results 1 to 7 of 7

Password Sign On - Help, please!!

  1. #1
    Registered User
    Join Date
    03-20-2013
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Password Sign On - Help, please!!

    I am very new to VBA and am stumped! I have an Excel worksheet that I need to have users access by entering a Username and Password. I keep the user names and passwords on another tab in the same file. I am trying to verify that the user name and user password match the list before allowing the user to access the spreadsheet. I am getting "method range of object _global failed" error and I cannot seem to locate the error in my code. Would someone please help? Thank you!


    Please Login or Register  to view this content.
    Last edited by alansidman; 11-25-2013 at 07:04 PM. Reason: code tags

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Password Sign On - Help, please!!

    Username is defined as a range. You need it like this

    Please Login or Register  to view this content.
    Unless you want the .Value in which dim Username as string

    Might be more but that is the first one I see. In addition, what would stop someone from disabling macro's or just unhiding the sheet to use as they see fit?

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,754

    Re: Password Sign On - Help, please!!

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    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, it also maintains VBA formatting.

    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



    (I have added the code tags for you today. Please read all forum rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    03-20-2013
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Password Sign On - Help, please!!

    Sorry about that, will do.

    Thank you!

  5. #5
    Registered User
    Join Date
    03-20-2013
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Password Sign On - Help, please!!

    I made the change but get the same error. I am going to try as a String next.

    The intent is to get the user to login before they answer test questions. I am not too concerned about disabling the macros, but unhiding the sheet is a good point. Ultimately, the user will login, click on a button to get the next item for review, that item will unhide the appropriate questions for their responses to that review type. The first phase works great, but I am adding in 2 more topics for review and will need the excel worksheet to eliminate some of the human error in the more manual process we use today. I am not quite to the hiding rows build yet, but I will definitely like to lock the entire thing down other then their entries once it is complete. I am working on this piece by piece for now.

    I appreciate the great input and I'll let you know if changing from a range to a string solves this first problem.

    Thank you!

  6. #6
    Forum Contributor
    Join Date
    11-15-2012
    Location
    Buffalo, NY
    MS-Off Ver
    Office 365
    Posts
    319

    Re: Password Sign On - Help, please!!

    You have two worksheets, right? The first one (which is not named anywhere) and the second one, which is ws3.

    I'd suggest that you be very explicit about which worksheet you are trying to reference. You might want to try adding
    Please Login or Register  to view this content.
    and then precede the ranges that you expect to be on wksSignIn withwksSignIn.Range etc.

    Without this human readers (and quite possibly, the Excel VBA environment) could get confused about which worksheet the range is on....

    ...leading to a possible "method range of object _global failed" error message.

    Just a thought,

    Tony

  7. #7
    Registered User
    Join Date
    03-20-2013
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Password Sign On - Help, please!!

    Thank you to everyone, went a slightly different direction but it works!
    The suggestions were very helpful!

    Please Login or Register  to view this content.

+ 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. Replies: 3
    Last Post: 03-13-2013, 01:20 AM
  2. Decimal Sign Replaced with ; Sign
    By lopiner in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-10-2009, 08:47 AM
  3. Macro - asked username & password and sign into Yahoo Finance
    By cbnowhere in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-02-2006, 04:50 PM
  4. [SOLVED] XL invoice replace the dollar sign with euro sign
    By Pamela casares in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 12-16-2005, 04:25 PM
  5. -ve no with -1; positive with sign+ and 0 no sign? Tks.
    By shirley in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-23-2005, 02:20 AM

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