+ Reply to Thread
Results 1 to 2 of 2

Constant code interruption...

  1. #1
    Registered User
    Join Date
    08-27-2009
    Location
    Milton Keynes
    MS-Off Ver
    Excel 2007
    Posts
    45

    Constant code interruption...

    I have created a UserForm that allows people to log-in to my worksheet -using stored information in A:A(username) and B:B (password).

    On the same sheet, I have a cell in which I would like the UserForm to paste the "Username" entry of the form into Cell J2 (this will be used to check the current user logged in). It's really frustrating as I have found the route cause, and tried many different scenarios, to no avail.

    My full code is below, the highlighted range (red) seems to be the thing causing all of these problems. I can run the code once (on occasion twice) before it takes me to the VBE and highlights the "Private Sub LogInButton_Click() UserLogIn.Show part, with a message saying the code had been interrupted.

    as soon as you remove it from the code it works perfectly. Is there a way around this?

    UserForm Code
    Please Login or Register  to view this content.
    Sheet Code
    Please Login or Register  to view this content.
    Last edited by RayJay01; 05-22-2013 at 05:21 PM.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Constant code interruption...

    what if you don't activate the other sheet but qualify your range statements instead? ie use sheets("login").range(...) rather than just Range(...)
    Josie

    if at first you don't succeed try doing it the way your wife told you to

+ 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