Convert HEX to Decimal

# Thread: Convert HEX to Decimal

1. Senior Member
Join Date
Dec 1969
Posts
220

## Convert HEX to Decimal

I know how to convert a decimal number to a hexidecimal number by using HEX(16). But how can you easily convert the hexidecimal number back to decimal format?

2. Senior Member
Join Date
Dec 1969
Posts
96,118

## You'll love this one...

&#060;%<BR>str = "F0C3D" &#039; or wherever you get the hex number in string form from!<BR><BR>num = CLNG( "&H" & str )<BR>%&#062;<BR><BR>

3. Senior Member
Join Date
Dec 1969
Posts
220

## That works for me.

Thanks.

4. Senior Member
Join Date
Dec 1969
Posts
1,765

## Can we assume a similar answer

If the value was in oct

5. Senior Member
Join Date
Dec 1969
Posts
96,118

## If you know the VBS prefix...

...or octal, sure. I don&#039;t know it offhand.<BR><BR>

6. Senior Member
Join Date
Dec 1969
Posts
7,686

## &O <eop>

.

7. Junior Member
Join Date
Dec 1969
Posts
20

## Bravo! Great Tip!

I just had to say - BRAVO!<BR><BR>That is a great tip!

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•