Results 1 to 7 of 7

Thread: [RESOLVED] convert number to character

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2002
    Location
    London
    Posts
    678

    Resolved [RESOLVED] convert number to character

    How do I turn a number into a character - e.g. 1 into A?
    Thanks

  2. #2
    Frenzied Member Phill64's Avatar
    Join Date
    Jul 2005
    Location
    Queensland, Australia
    Posts
    1,201

    Re: convert number to character

    Chr(1)

    which isnt A
    A is 65
    a is 97

    lookup "ascii chart" in msdn to get the list

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: convert number to character

    I think he means their ordinal values rather than ASCII.

    VB Code:
    1. MessageBox.Show(Convert.ToChar(myval + 64).ToString())

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2002
    Location
    London
    Posts
    678

    Re: convert number to character

    I have now solved this issue.
    Thank you all

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: convert number to character

    Add Resolved to the thread title. Ya never know...

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2002
    Location
    London
    Posts
    678

    Re: convert number to character

    how do I do that, where is the link please?

  7. #7
    Fanatic Member staticbob's Avatar
    Join Date
    Jan 2005
    Location
    Manchestershire, UK Cabbage: I do
    Posts
    619

    Re: convert number to character

    From Thread tools, top right, choose mark as resolved, and edit the thread title.

    Bob
    "I dislike 7 am. If 7 am were a person, I would punch 7 am in the biscuits." - Paul Ryan, DailyRamblings

Posting Permissions

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



Click Here to Expand Forum to Full Width