Any way to convert an int or a float to hexadecimal?

One little detail, the variables: Result and Temp must be local. Are yours local? If they are not, then, the result will always append to the previous one, resulting in an ever growing string.

So, make sure they are local, or set Result to empty at the beginning of the function.