+ Reply to Thread
Results 1 to 3 of 3

How do I convert char into integer in Excel VBA?

  1. #1
    RaY
    Guest

    How do I convert char into integer in Excel VBA?

    Hi all,
    I am trying to do a little programming exercise with Excel VBA, I have
    seen the way that converting integer into char and I want to try the way that
    converting char into integer. I was using Int() as the converter... but after
    I have seen the spec and I noticed that I was wrong of using this function.
    I tried to subtract the char with 64, well... stupit me and the type was
    not match LOL. So that, is it possible to convert char into int in any other
    way?

    Thanks

  2. #2
    Forum Contributor
    Join Date
    12-12-2005
    Posts
    667

    Characters into integer

    Sub test()
    MsgBox Asc("a")
    End Sub

    will display 97 that is the ASCII integer for "a".
    Do NOT do this in the spreadsheet: =ASC("a")
    Best regards,

    Ray

  3. #3
    RaY
    Guest

    Re: How do I convert char into integer in Excel VBA?

    Thanks mate. I have been looking for this function for a long time.

    "raypayette" wrote:

    >
    > Sub test()
    > MsgBox Asc("a")
    > End Sub
    >
    > will display 97 that is the ASCII integer for "a".
    > Do NOT do this in the spreadsheet: =ASC("a")
    >
    >
    > --
    > raypayette
    >
    >
    > ------------------------------------------------------------------------
    > raypayette's Profile: http://www.excelforum.com/member.php...o&userid=29569
    > View this thread: http://www.excelforum.com/showthread...hreadid=563544
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1