textchanged event trigger with enter key

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mygirl22
    New Member
    • Feb 2009
    • 20

    textchanged event trigger with enter key

    hi,
    How do i code an enter event textchanged event to only work when the enter key is pressed?

    1. i have a text button that has a value, or a user can enter their own value
    2. however when they enter their own value, the total value doesn't changed because they need to press the enter key to validate the event....am stuck, plz help
  • smartchap
    New Member
    • Dec 2007
    • 236

    #2
    Dear mygirl22
    In place of change event in KeyPress event of the text box u use
    If KeyAscii = vbKeyReturn Then .....
    so that on pressing Enter key code after THEN will get executed.

    Comment

    • debasisdas
      Recognized Expert Expert
      • Dec 2006
      • 8119

      #3
      you need to code that in keyPress event .

      Comment

      • mygirl22
        New Member
        • Feb 2009
        • 20

        #4
        thank

        Originally posted by smartchap
        Dear mygirl22
        In place of change event in KeyPress event of the text box u use
        If KeyAscii = vbKeyReturn Then .....
        so that on pressing Enter key code after THEN will get executed.
        thanks i figured it out

        Comment

        Working...