hi first time here, i am making a program to calculate postage costs. and on a loop that is in the program when it does the sum of 3.45 + 0.86 it comes up with 4.30 when it should be 4.31
The loop Code:
Dim extracost As Currency Dim loopcost As Currency Dim extracostformated As Currency Dim loopcostformated As Currency loopcost = 3.45 extracost = 0.86 loopcostformated = FormatNumber(loopcost, 2) extracostformated = FormatNumber(extracost, 2) Cost = loopcostformated And Weight = Weight - 1000 Do While Weight > 0 Weight = Weight - 250 Cost = Cost + extracostformated Loop




Reply With Quote