+ Reply to Thread
Results 1 to 4 of 4

Invalid username Msgbox and Run time error

  1. #1
    Registered User
    Join Date
    02-26-2014
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    33

    Invalid username Msgbox and Run time error

    Good Evening All,

    I have a code for userform login. The users will enter their user name, password, and role and then click on submit. The user names, password and roles are given in the sheet "user access".

    Now the problem is if a user enters a wrong user name which is not on the sheet "user access", it gives a msg stating invalid username. And if I click ok it is showing a run time error. Is there a way to stop showing this run time error and just show the invalid username msg box alone.

    Kindly help me with this.

    Thanks in advance....
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-01-2013
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    324

    Re: Invalid username Msgbox and Run time error

    (Open the login form and right click and view code on the SUBMIT button)


    You need to change the command button line from:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    to

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    As you have it, it doesn't give any instructions for errors, it tries to proceed as normal. The update will stop the process at the login level until successful or closed.

    Updated file attached:
    Attached Files Attached Files
    Last edited by playaller; 05-07-2014 at 06:03 PM.


    Shelton A.
    If Helpful, Add Reputaion!

  3. #3
    Registered User
    Join Date
    02-26-2014
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Invalid username Msgbox and Run time error

    Hi,

    Thank you so much. This was very helpful.

  4. #4
    Valued Forum Contributor
    Join Date
    09-01-2013
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    324

    Re: Invalid username Msgbox and Run time error

    Anytime! Don't forget to mark the thread as solved.

+ 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. login site with username and paswd - Run time error'91'
    By prabhuduraraj09 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-19-2014, 02:55 PM
  2. [SOLVED] Run-time error 94; Invalid use of Null
    By williams485 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-29-2012, 09:36 AM
  3. Run Time Error: 94 (invalid use of null)
    By jason_kelly in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-14-2012, 02:06 PM
  4. Run time Error 5: Invalid procedure or argument
    By cmcconna in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-27-2009, 04:06 PM
  5. Run Time Error '94' Invalid use of null
    By stoey in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-28-2008, 05:44 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