title: Conversion from hexadecimal string to Double yields wrong results
body: <p>I am trying to convert 14 bit hex numbers to decimal.</p>
  
  <p>I have this VBA code.</p>
  
  <pre><code>Option Explicit
  
  Public Function HexadecimalToDecimal(HexValue As String) As Double
  
  Dim ModifiedHexValue As String
  ModifiedHexValue = Replace(HexValue, "0x", "&amp;H")
  
  HexadecimalToDecimal = CDec(ModifiedHexValue)
  End Function
  </code></pre>
  
  <p>With numbers like this to convert to decimal</p>
  
  <ul>
  <li>0x047B1142591E80</li>
  <li>0x044A81325A1E80</li>
  <li>0x047B7542591E80</li>
  </ul>
  
  <p>I keep getting random results across large amounts of data. Sometimes spot on other times the numbers are off by 6 or 2.</p>