Hello all,
I am attempting to use VBA code to read certain cells on a worksheet. I'm having trouble getting the decimal values of in cells with amounts. For example, a cell has the value 1,000.53. When I use the following code to retrieve the cell value:
This code will bring back a value of 1,000, even though in the cell the value specified is 1,000.53. I need to get the exact value in the cell. The variable "Deduct_AMT" is defined as "Long".
Anyone have any thoughts or suggestions?
Many thanks!
I am attempting to use VBA code to read certain cells on a worksheet. I'm having trouble getting the decimal values of in cells with amounts. For example, a cell has the value 1,000.53. When I use the following code to retrieve the cell value:
Code:
' *----------------------------------*
' * Retrieve deductible amount. *
' *----------------------------------*
' *
Deduct_AMT = Range("E20").Select
Deduct_AMT = ActiveCell.Value
This code will bring back a value of 1,000, even though in the cell the value specified is 1,000.53. I need to get the exact value in the cell. The variable "Deduct_AMT" is defined as "Long".
Anyone have any thoughts or suggestions?
Many thanks!