I sometimes use the Hex$ function to convert a large Dec number to a Hex string in VB6. This works great to a point. If a Dec number is greater than 2147483647 the Hex$ function returns an overflow error. This is due to the Hex$ function only going to 8 places and 2147483647 = 7FFFFFFF.

If a larger number needs to be converted it will probably require writing a routine to do this for me. I do not think there is any mathematical formula that will do this for me.

Any ideas?