There's something weird that happens when I run this code:
Dim curSales as Currency
curSales = Val(Inputbox("Enter a sales amount"))
do
curSales = Val(Inputbox("Enter a sales amount"))
Print curSales * .1
Loop Until curSales < = 0
Printable View
There's something weird that happens when I run this code:
Dim curSales as Currency
curSales = Val(Inputbox("Enter a sales amount"))
do
curSales = Val(Inputbox("Enter a sales amount"))
Print curSales * .1
Loop Until curSales < = 0
Apart from the fact that the first entry will not be recorded, what is "WEIRD"?
Steve.
How should I change it so the first entry WILL be recorded?
------------------
kazooie21
just skip the first line before the 'do ...'
if you want to print the curSales at least one time (even if it is negative), then use following code:
[CODE]
Dim curSales As Currency
While curSales <= 0
curSales = Val(InputBox("Enter a sales amount"))
Print curSales * 0.1
Wend
[\code]
[This message has been edited by c@lle (edited 11-23-1999).]