Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    next letter (xp/2k)

    if i want to get the next letter , how do i get it?
    i.e.
    dim x,text1 as variant
    text1 = "a"
    x= text1 +1

    I want x to be "b"

    IS there a way to do this?
    Thanks

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

    Re: next letter (xp/2k)

    Use Asc and Chr. Asc returns the numeric code (ASCII/ANSI) for the first character in a string, and Chr returns the character corresponding to a numeric code.

    x = Chr(Asc(Text1) + 1)

  3. #3
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: next letter (xp/2k)

    thanks Hans

Posting Permissions

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