Using the Keyup() with an array of Textboxes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Pankaj Upmanyu
    New Member
    • Sep 2007
    • 4

    #1

    Using the Keyup() with an array of Textboxes

    Hi, I am trying to use the Enter key with an array of text boxes (Keyup event). I can't. How to use it with the (Text(1).Text) array members. Please Help.
    Pankaj
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    Originally posted by Pankaj Upmanyu
    Hi, I am trying to use the Enter key with an array of text boxes (Keyup event). I can't. How to use it with the (Text(1).Text) array members. Please Help.
    The [Enter] key can be a problem, as it is sometimes handled automatically by Windows before you get a chance at it. For instance, if you have a command button on the form with the Default property set to True, pressing [Enter] usually triggers that button.

    However, that being said, you should be able to get away with detecting it in the KeyUp event. So what's the problem? And what is it you want to do with the [Enter] key? I was going to ask what version of VB, but since you're using an array I guess it would be VB6 or maybe VB5.

    Comment

    • QVeen72
      Recognized Expert Top Contributor
      • Oct 2006
      • 1445

      #3
      Hi,

      Index of the textBox will be passed in the keyPress Event,
      Depending on the Index, u can write the Code

      Regards
      Veena

      Comment

      Working...