+ Reply to Thread
Results 1 to 6 of 6

Macro run after user finish input text box

  1. #1
    Registered User
    Join Date
    02-23-2010
    Location
    asd
    MS-Off Ver
    Excel 2003
    Posts
    27

    Macro run after user finish input text box

    Hi expert,
    I hava a text box on a userform.
    i would like to ;
    1) once userform done/ input data in userform , macro run.
    ex: if user input "start" in text box, after 2 second ( whihc is done input value), macro automaitcally run without pressing any button or key.

    please advise.....

  2. #2
    Registered User
    Join Date
    05-05-2011
    Location
    Belgium
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Macro run after user finish input text box

    Hi celticpucca, try using the Change property. For example, if the name of your text box is txtBox add the following code to your userform:

    Please Login or Register  to view this content.

    I hope that's what you need, otherwise let us know.

  3. #3
    Registered User
    Join Date
    02-23-2010
    Location
    asd
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Macro run after user finish input text box

    hi inesi,
    how about if the user input others value ? such as "F99827BHG" or " 1234ABC"?
    and i want it to run automactically after it done input.?

  4. #4
    Registered User
    Join Date
    05-05-2011
    Location
    Belgium
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Macro run after user finish input text box

    Hi Celticpucca, in this case try the code below. Please notice this code is not case sensitive and you would need to start the strings in lower case as I am using the function LCase in the Select Case. If you need to make it case sensitive remove the LCase and enter the strings the way you need (case "XXXxxxXXX", for example):

    Please Login or Register  to view this content.

    Good luck

  5. #5
    Registered User
    Join Date
    02-23-2010
    Location
    asd
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Macro run after user finish input text box

    hi all,
    i had modified the code

    Please Login or Register  to view this content.
    if my relabtext = "", it will do nothing/ dont run macro. if relabtext<> "", which is i done input data, it will run macro "run1".
    But my problem is, i did not finish input the data, my macro run. ex: i want to type "start", but, when i type the letter "s", it automtatically run without wait until i finish it...
    please help...

  6. #6
    Registered User
    Join Date
    02-23-2010
    Location
    asd
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Macro run after user finish input text box

    hi,
    i had attached the file.
    it seem like to code loop thru many time...
    when i add value < 9 character, the msg box appear more then 4 times. after click ok for 4 times. its ok...
    please help....
    Attached Files Attached Files

+ 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