+ Reply to Thread
Results 1 to 2 of 2

Handling Errors in a Userform

  1. #1
    Forum Contributor
    Join Date
    03-13-2009
    Location
    New Jersey
    MS-Off Ver
    Excel 2007
    Posts
    136

    Handling Errors in a Userform

    All I want to happen is if the user enters incorrect information, use a msgbox to tell them what to do to correct it and then allow them to correct it before proceeding. I have the following code:



    Please Login or Register  to view this content.
    I have 3 conditions that I want to check for:

    1. Row count greater than 36
    2. Column count greater than 2
    3. All values are numeric

    If any of those conditions are violated I want the user to be able to go back and correct it and then allow the program to proceed with the proper information. I tried a goto statement with disastrous consequences (endless loop) and I can't figure out what to try next. There is only one thing the user has to input up to the 3 condition check and that is to select a range of cells. How do I get the program execution back to the point where they can select a range of cells again?

    Please let me know if this is not making any sense.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Handling Errors in a Userform

    Maybe just exit?

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

+ 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