+ Reply to Thread
Results 1 to 2 of 2

Textbox exit event prevents to exit userform

  1. #1
    Registered User
    Join Date
    07-26-2014
    Location
    Brussels
    MS-Off Ver
    MS Office 2010
    Posts
    22

    Textbox exit event prevents to exit userform

    Hello, I have a userform with a mandatory textbox. Default value of this textbox is "ID". To force the user to enter an ID number in this textbox I'm using following code:

    Please Login or Register  to view this content.
    This works well but has an unwanted consequence: if the user clicks the form's exit button, he's trapped into the textbox exit event. The only way to get out of this is CTRL+BREAK command.

    Please Login or Register  to view this content.
    Is there a workaround ? Thanks !

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Textbox exit event prevents to exit userform

    If you have some sort of "Submit" type command button, the textbox's validation code could go there instead.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

+ 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. Stop exit event of textbox firing when click a command button to close a userform
    By chrisjames25 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-18-2013, 09:27 AM
  2. [SOLVED] Problems with Exit event for Textbox
    By tfurnivall in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-11-2013, 11:03 AM
  3. Textbox Exit Event Cant not be trigger
    By stewegg in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-26-2012, 01:26 PM
  4. Userform Textbox Exit Event to Run Application
    By baisty182 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-29-2010, 12:30 PM
  5. Userform textbox event that fires after I exit the textbox
    By jerseyguy1996 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-04-2010, 08:08 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