Formatting a variable

J

Julian Milano

I have the following code:

Type ProdMatrix
APN As Single
.....
Dim ThisProd As ProdMatrix
.....
tmpThisProd.APN = .Cells(tmpSrcRow, 2)

The variable is supposed to contain the number 9317382120228, but instead
contains 9.317382E+12

Then, when I execute the following code:

With ThisProd
Cells(LastRowDest, 1) = .APN & .StoreNo

I get the result of 9.317382E+123201 in the cell where:
ThisProd.APN = 9.317382E+12
ThisProd.StoreNo = 3201

I was expecting to get the number 93173821202283201. Why is the value of APN
taken literally and not by value?
 
Top