Click to See Complete Forum and Search --> : what's wrong here?
kazooie21
Nov 21st, 1999, 10:19 AM
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
SteveS
Nov 21st, 1999, 11:35 AM
Apart from the fact that the first entry will not be recorded, what is "WEIRD"?
Steve.
kazooie21
Nov 22nd, 1999, 04:25 AM
How should I change it so the first entry WILL be recorded?
------------------
kazooie21
c@lle
Nov 22nd, 1999, 03:59 PM
just skip the first line before the 'do ...'
c@lle
Nov 22nd, 1999, 07:19 PM
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).]
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.