Formatting a variable

  • Thread starter Thread starter Julian Milano
  • Start date Start date
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top