Finding the number value of a hex value
Alvin,
Here is some code that may do what you need:
Private Sub Command1_Click()
Dim myHex As String, myDecimal As Long
myHex = Hex(76)
MsgBox "Hex = " & myHex
myDecimal = "&H" & myHex
MsgBox "Decimal = " & myDecimal
End Sub
Hope this helps,
Kerry Moorman
Quote:
>The Hex value of 76 is 4C. I would normally determine this by:
>x = Hex(76)
>Now. How would I go about finding out the value of x. I want to know the
>correct syntax to get a variable to come out to be 76. I know you're
supposed
>to use &H to find out the value of a hex value. But you can't use variables
>with that. Like &HX. It returns a type mismatch error. I hope I made myself
>clear.
>Alvin Cartuyvels
>Internet Manager
>Printer's Repair Parts
>http://www.printersrepairparts.com