|
-
Nov 21st, 1999, 11:19 AM
#1
Thread Starter
Junior Member
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
-
Nov 21st, 1999, 12:35 PM
#2
Lively Member
Apart from the fact that the first entry will not be recorded, what is "WEIRD"?
Steve.
-
Nov 22nd, 1999, 05:25 AM
#3
Thread Starter
Junior Member
How should I change it so the first entry WILL be recorded?
------------------
kazooie21
-
Nov 22nd, 1999, 04:59 PM
#4
Addicted Member
just skip the first line before the 'do ...'
-
Nov 22nd, 1999, 08:19 PM
#5
Addicted Member
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).]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|