Undesired Rounding in VBA; accumulating values
Sorry I don't have a copy of the source code handy, but here goes:
I'm reading values from a series of cells in one sheet (stored in a 2D
array), then accumulating values in a destination sheet. The array is
type Double; using XL2002.
The source data goes to three decimal places (ex. 0.245), but the
value accumulated is rounded (ex. 0.25).
Source Sheet reading:
ActiveCell.Offset(Row, Column).Value = dblArray(RV,CV)
Destination Sheet accumulating:
ActiveCell.Offset(Row, Column).Value =
ActiveCell.Offset(Row,Column).Value + dblArray(RV,CV)
-Glenn
Any clue as to why this is happening?
|