I am trying to do simple division into a variable and I am getting an error overflow on my DrPct_2200= statement below.
I know it may have something to do with how my variables are defined but I have tried Integer, Numeric, String, Long and Variant with no success. Here is the code:
Drive_Count as an example is 10 and Drive_2200 is 7 then I want DrPct_2200 to end up equalling "70%". I will have to figure out how to add the percent sign after I get my overflow problem fixed.
Can you help?
Thanks.
I know it may have something to do with how my variables are defined but I have tried Integer, Numeric, String, Long and Variant with no success. Here is the code:
Code:
Dim Drive_Count As Variant
Dim DrPct_2200 As Variant
Dim Drive_2200 As Variant
Drive_Count = Drive_Cell.Offset(0, 2)
Drive_2200 = Drive_Cell.Offset(0, 34)
DrPct_2200 = Drive_2200 / Drive_Count
Can you help?
Thanks.