I have a variable which is an hex string that I need to convert into a
long data type

Dim myHex
Dim myLong

myHex = "FF00FF"
myLong = 1655545

if myHex < myLong then blah blah

Since I am comparing the two value I need to convert myHex into a Long
data type.

Thank you for your help.

Re: how to convert a Hex string into a Long data type? by BlueFox

BlueFox
Mon Feb 09 18:10:13 CST 2004

Dim myHex
Dim myLong

myHex = "FF00FF"
myLong = 1655545

If CLng( "&H" & myHex) < myLong Then
End If


"Cubik" <cubik@yahoo.com> дÈëÏûÏ¢
news:6ffe9f65.0402091525.51506388@posting.google.com...
> I have a variable which is an hex string that I need to convert into a
> long data type
>
> Dim myHex
> Dim myLong
>
> myHex = "FF00FF"
> myLong = 1655545
>
> if myHex < myLong then blah blah
>
> Since I am comparing the two value I need to convert myHex into a Long
> data type.
>
> Thank you for your help.