A Fast Hex 2 Decimal Conversion

By | 2002-04-20

Simple way to convert Hex to Dec in one line of code. This code is for Beginners.

Original Author: Billy Conner

Assumptions

The Hex to Dec conversion gives an error if greater val than the MAX value of a long integer.
(2,147,483,647) (&H7FFFFFFF)

Code

MYHEX$ = "7FFFFFFF"
Mydec& = Val("&H" & MYHEX$)

Author: dwirch

Derek Wirch is a seasoned IT professional with an impressive career dating back to 1986. He brings a wealth of knowledge and hands-on experience that is invaluable to those embarking on their journey in the tech industry.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.