View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Excel 2007 VBA: Convert laaaaarge number to Hex

Rick Rothstein presented the following explanation :
Both! VBA raises the error I posted. Wks returns #VALUE!
Here's the code


Okay, I think I know what is happening... the value in the cell is not a
integer value, it is a value in scientific notation (3.77198E+16) which is
what is passed into the function... the function does not know what to do
with the decimal point or the E, so it errors out. Either enter the numbers
with an apostrophe in front of them or change the cell format to Text and
type the number in so that it hold all of its digits (you might have missed
that the original number 37719831058777893 was changed to 37719831058777800
because of Excel's precision display limitations).

Rick Rothstein (MVP - Excel)


Yes, I did all this already because of the issues you mention here,
noting that you mention passing the # as a text string. Still raises
the errors (VBA/Cell)! I'll retry this today...

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc