@Floyd:
Well you got me there. You're right. Frankly though, I'm not very concerned by that limitation for this function. It succesfully handles a very wide range of values and number bases in a single function. I designed it to extract information from a text file script for a game I'm working on. I want to include color values in the script, so the maximum value I need is 0xFFFFFF which appears to be the maximum value this function handles accurately. Phwew!
Thank you for pointing out that limitation. It is good to know about. :) I'll add a note to the top of the code.
@aab:
I've used exactly that technique for handling Hex and Binary, but for decimal integers and floats that isn't necessary. Look more closely at how the function works and you'll see that decimal conversions are handled in just one statement:
Num# = StringNumeric$
If you make the function only return integer values, then this one line will also return the huge number Floyd tested with above.
P.S. Following Rob Farley's comment above, I've just made a small optimization to the Select/Case structure in the Hex conversion.