Dim checks As Double
        Dim Fee As Double
        Dim Q As Double
        Dim Initial As Double
        Initial = 10

        Dim number1 As Decimal = 0.1D
        Dim number2 As Decimal = 0.08D
        Dim number3 As Decimal = 0.06D
        Dim number4 As Decimal = 0.04D

        TextBox1.Text = checks

        If checks >= 1 And checks <= 20 Then
            Fee = (checks) * (number1)
        ElseIf checks >= 21 And checks <= 39 Then
            Fee = (checks) * (number2)
        ElseIf checks >= 40 And checks <= 59 Then
            Fee = (checks) * (number3)
        ElseIf checks >= 60 Then
            Fee = (checks) * (number4)
        End If

        Q = CDbl(Initial) + CInt(Fee)
        Label3.Text = CStr(Q)

Ok the code is not multiplying the variable and only using the variable (Initial) in the calculation
What I am trying to figure out is well how i get this to multiply correctly
Example would be I input 15 into the text box what should appear in the label is 11.50 and all it shows is 10 >.<

Recommended Answers

All 5 Replies

You are declaring Fee as double on th top and than returning an Integer in line 24
In line 12 you are assigning a double to a textbox ?
textbox1.text= Cstr(checks)?

Well its because im fiddling around with the code to see if its stupid stuff like assigning the wrong value type and the code i posted is likely my last save . Also changed either of the values u mentioned does not effect the problem.

In line 12 you are assigning checks to a textbox. Maybe you wanted checks to be what is in the textbox
checks= CDbl(TextBox1.Text)

Hi Skyinfinity,

you might want to do some error handling later but your code is all fine except for a single line there

Use of assignment property i think on line 12

Change TextBox1.Text = checks to this ** Checks = Cdbl(Textbox1.text)**

And the rest should work fine

I hope this helps

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.