How to convert extra long strings into their equivalent Hex Strings in VBA (Word 2K)
- From: zeGenius@xxxxxxxxx
- Date: Wed, 14 May 2008 09:35:48 -0700 (PDT)
Hi there,
I have an interesting problem. I am trying to write code in VBA (Word
2K) wherein I have to convert a string-representation of really large
numbers (upto 18 digits max) into its equivalent Hex String
representation
e.g. ConvertNumberToHex( "999999999999999999" ) => "DE0B6B3A763FFFF"
I have no problems as long as the number being passed to the function
is less than the max allowed by the Long Type in VBA (Word 2K) viz.
&h7FFF FFFF = 2147483647. But, when the input is larger than this
number, I get overflows.
Trying the Hex() or Val() also results in overflows when the input
number exceeds &h7FFF FFFF
Any ideas how to perform this function easily in VBA (Word 2K)?
- Neil
.
- Follow-Ups:
- Re: How to convert extra long strings into their equivalent Hex Strings in VBA (Word 2K)
- From: Robert Morley
- Re: How to convert extra long strings into their equivalent Hex Strings in VBA (Word 2K)
- From: Karl E. Peterson
- Re: How to convert extra long strings into their equivalent Hex Strings in VBA (Word 2K)
- From: Henning
- Re: How to convert extra long strings into their equivalent Hex Strings in VBA (Word 2K)
- From: expvb
- Re: How to convert extra long strings into their equivalent Hex Strings in VBA (Word 2K)
- From: David Kerber
- Re: How to convert extra long strings into their equivalent Hex Strings in VBA (Word 2K)
- Prev by Date: Re: Revisit Shell Function
- Next by Date: Re: parsing the command line?
- Previous by thread: C++ Code to VB6
- Next by thread: Re: How to convert extra long strings into their equivalent Hex Strings in VBA (Word 2K)
- Index(es):
Relevant Pages
|
Loading