|
-
Apr 11th, 2005, 10:26 AM
#1
Thread Starter
Frenzied Member
Simple Data Calculation
I am trying to create a simple credit calculator that calculates the tax percentage, then it takes that percentage and multiplies it by the different shipping tiers we have, but for some reason, i cant get the values, to turn into actual money values, I did the Ccur but it dosent work
VB Code:
Option Explicit
Dim num1 As Double
Dim num2 As Double
Dim num3 As Double
Dim num4 As Double
Dim num5 As Double
Dim answer1 As Double
Private Sub Command1_Click()
num1 = Text1.Text
num2 = Text2.Text
num3 = Text3.Text
num4 = Text4.Text
answer1 = (num2 / num1)
Text3.Text = answer1
Text4.Text = (answer1 * num1) + (num1)
Text5.Text = CCur(Text5.Text * answer1)
Text6.Text = CCur(Text6.Text * answer1)
Text7.Text = CCur(Text7.Text * answer1)
Text8.Text = CCur(Text8.Text * answer1)
Text9.Text = CCur(Text9.Text * answer1)
Text10.Text = CCur(Text10.Text * answer1)
Text11.Text = CCur(Text11.Text * answer1)
Text12.Text = CCur(Text12.Text * answer1)
Text13.Text = CCur(Text13.Text * answer1)
Text14.Text = CCur(Text14.Text * answer1)
Text15.Text = CCur(Text15.Text * answer1)
Text16.Text = CCur(Text16.Text * answer1)
Text17.Text = CCur(Text17.Text * answer1)
Text18.Text = CCur(Text18.Text * answer1)
Text19.Text = CCur(Text19.Text * answer1)
End Sub
'Clear the Values
Private Sub Command3_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = "0"
Text4.Text = "0"
Form_Load
End Sub
Public Sub Form_Load()
' Loading the values into the sections
Text5.Text = CCur(4.95)
Text6.Text = CCur(5.95)
Text7.Text = CCur(8.95)
Text8.Text = CCur(10.95)
Text9.Text = CCur(12.95)
Text10.Text = CCur(9.95)
Text11.Text = CCur(11.95)
Text12.Text = CCur(13.95)
Text13.Text = CCur(15.95)
Text14.Text = CCur(17.95)
Text15.Text = CCur(24.95)
Text16.Text = CCur(26.95)
Text17.Text = CCur(28.95)
Text18.Text = CCur(30.95)
Text19.Text = CCur(32.95)
End Sub
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
|