M
Mark
I am getting some odd results when using the int() function within
VBA.
Here is what is happening:
quantity = dblTransactionQuantity
quantityWithoutDecimalPlaces = dblTransactionQuantity * 1000
integerpart = Int(quantityWithoutDecimalPlaces)
When you set the dblTransactionQuantity to 1.001 intergerpart returns
1000, but it should return 1001. Is this a floating point error? If
you set the dblTransactionQuantity as 1.002 the correct answer is
returned (1002). Any suggestions?
VBA.
Here is what is happening:
quantity = dblTransactionQuantity
quantityWithoutDecimalPlaces = dblTransactionQuantity * 1000
integerpart = Int(quantityWithoutDecimalPlaces)
When you set the dblTransactionQuantity to 1.001 intergerpart returns
1000, but it should return 1001. Is this a floating point error? If
you set the dblTransactionQuantity as 1.002 the correct answer is
returned (1002). Any suggestions?