Conversion of ASCII hex number to decimal conversion

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DixitSolanki
    New Member
    • Oct 2008
    • 5

    Conversion of ASCII hex number to decimal conversion

    I want to convert ASCII hex number to decimal conversion.

    For Example :

    1: F01A is converted into Decimal: 61466
    2: FFFC64F0 is converted into Decimal: 4294730992

    What is the best way to create a smaller function for the above like conversion.

    Pls.send me the complete function
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    you need to use DEC for the purpose.

    msgbox dec(&HFFFC64F0)

    Comment

    • DixitSolanki
      New Member
      • Oct 2008
      • 5

      #3
      Thanks for your reply.

      I tried as per your suggestion, But it gives error as Dec is not SUB or Function not defined.

      Now Pls. Help me.



      Originally posted by debasisdas
      you need to use DEC for the purpose.

      msgbox dec(&HFFFC64F0)

      Comment

      • QVeen72
        Recognized Expert Top Contributor
        • Oct 2006
        • 1445

        #4
        Hi,

        Prefix the Hex Number with "&H", that way VB understands, its a Hex number..
        and Get the Decimal Equivalent using CDEC function :

        [code=vb]
        MsgBox CDEC("&HF01A")
        [/code]

        Regards
        Veena

        Comment

        • DixitSolanki
          New Member
          • Oct 2008
          • 5

          #5
          Originally posted by QVeen72
          Hi,

          Prefix the Hex Number with "&H", that way VB understands, its a Hex number..
          and Get the Decimal Equivalent using CDEC function :

          [code=vb]
          MsgBox CDEC("&HF01A")
          [/code]

          Regards
          Veena
          Thanks for your affort.

          Yes, it will work for values less then 7FFFFFFF. But what after that?

          But, Now no need to worry. I had solve the problem.

          Again Thanking you.

          Comment

          Working...