Convert hex value to a decimal value in VB6

前端 未结 8 2153
日久生厌
日久生厌 2021-02-20 04:08

How can I convert a hex value to a decimal value in VB6?

I\'m trying just to see if this works:

Dim hexVal as string
hexVal = \"#7B19AB\"
clng(\"&H\         


        
8条回答
  •  庸人自扰
    2021-02-20 04:24

    This should do it

    Dim hexVal as String
    hexVal = "#7B19AB"
    Dim intVal as Integer
    intVal = Val("&H" & Replace(hexVal, "#", ""))
    

提交回复
热议问题