Convert to Hex

J

Jay B. Harlow [MVP - Outlook]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top