Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Key Codes (VB 6.0 / W98)

    I am trying to use code found in a reference book that checks for whole number text entries. Part of the code looks like this:

    (KeyAscii < KEY_0 Or KeyAscii > KEY_9 .....

    But I get an error message that KEY_0 has not been defined. Obviously I'm missing the code that defines it, but I don't have the info needed to define it. Any help would be welcome.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Key Codes (VB 6.0 / W98)

    Hello Chuck,

    All key codes in VB are constants of the form vbKeyxxx. You can look them up in the Object Browser.
    For the digits, they are vbKey0, vbKey1, ..., vbKey9

    Regards,
    Hans

  3. #3
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Key Codes (VB 6.0 / W98)

    Thanks Hans,

    I'll give it a go.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •