Convert to Hex

  • Thread starter Thread starter Guest
  • Start date Start date
Brent,
There are a number of them.

I normally use Integer.ToString

Dim value As Integer
Dim s As String

s = value.ToString("X")
s = value.ToString("X8")

As all types can support ToString.

Alternatively you can use the Hex function:

s = Hex(value)

Alternatively you could use the Format function:

s = Format(value, "x")
s = Format(value, "X")
s = Format(value, "X8")

Hope this helps
Jay
 
Back
Top