Results 1 to 3 of 3

Thread: hex to text, or asc (Solved)

Hybrid View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2005
    Location
    earth
    Posts
    89

    Resolved hex to text, or asc (Solved)

    if i have a hex string lets say its 61 how can i convert that to text ... i know you can convert text to hex by say hex("a") but how do i go back to text? chr converts from asc not hex so i cant use that....
    Last edited by zhahaman2001; Apr 13th, 2006 at 01:08 AM.
    Aim: zhahaman2001

  2. #2
    Hyperactive Member
    Join Date
    Feb 2003
    Location
    Grenada
    Posts
    346

    Re: hex to text, or asc

    strHex = "61"
    text1.text = chr("&H" & strHex)
    If my post has been helpful, then please rate it accordingly...
    If it has solved your question(s), then don't forget to mark the thread as "[Resolved]"... thank you.

  3. #3
    Frenzied Member pnish's Avatar
    Join Date
    Aug 2002
    Location
    Tassie, Oz
    Posts
    1,918

    Re: hex to text, or asc

    Or if you just want to convert from hex to decimal
    VB Code:
    1. Dim strHex As String
    2.     strHex = "6a"
    3.     Debug.Print "Hex " & strHex & " = " & Val("&H" & strHex) & " Decimal"
    Pete

    No trees were harmed in the making of this post, however a large number of electrons were greatly inconvenienced.

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