+ Reply to Thread
Results 1 to 3 of 3

Userform Macro

  1. #1
    Registered User
    Join Date
    03-16-2006
    Posts
    81

    Userform Macro

    I have a userform that has 2 textboxes.

    Please Login or Register  to view this content.
    The problem that as soon as i type in 1 number the msgbox pops up. I need the message box to appear one the cell has been completed and then be checked.

    What am i doing wrong?

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    You have not said how the macro is run or triggered.
    If you are using a TextBox1_Change macro you could test the length of the text before testing
    Please Login or Register  to view this content.
    You could also try using a TextBox1_AfterUpdate macro

    Another suggestion instead of using
    Please Login or Register  to view this content.
    Try

    Please Login or Register  to view this content.
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    You could use the TextBox_Exit event. The code will check the contents as another control takes Focus
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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