Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2002
    Location
    Mpls/St.Paul area
    Posts
    303

    Unanswered: ABCDE... what comes next?

    How do I turn a single character string into a hex or int value?

    I'd like to be able to offer the user the next 'number' in the list. The numbers have a single alpha character at the end.

    98322A
    98322B
    98322C

    I'd like to read the list, find the last, pull off the last character and then
    convert C to the integer or hex value, add one, convert back to string and give them

    98322D.

    Any ideas?

    Thanks
    John
    This is the day the Lord has made, I will rejoice and be glad in it.

  2. #2
    Join Date
    Feb 2002
    Posts
    29
    Try the Asc() and Chr() functions. They will turn a character into an integer and back again:

    Asc("A") = 65
    Chr(66) = "B"

  3. #3
    Join Date
    Jun 2002
    Location
    Mpls/St.Paul area
    Posts
    303
    Thanks. I looked, and looked and looked but forgot all about trying to find info on Ascii. Thanks to your timely help I will no doubt get a promotion, 20% payraise, and corner office (with windows).

    thanks again.
    John
    This is the day the Lord has made, I will rejoice and be glad in it.

  4. #4
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    cause you need to be carefull as ascii also inclued all the none printable charactores as well
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

Posting Permissions

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