0

The section for radiobutton2 does not work properly
Usually it returns either nothing or it wil display the msgbox insuficient funds, and wont debi if its proper

' Declare the value of service charge
servicecharge = 10
transaction = TextBox1.Text

' Deposit Funds to the account
If RadioButton1.Checked = True Then
Label3.Text = Label3.Text + TextBox1.Text
End If
 
If RadioButton2.Checked Then
If Label3.Text > TextBox1.Text Then
Label3.Text = Label3.Text - TextBox1.Text
ElseIf TextBox1.Text.ToString > Label3.Text Then
MessageBox.Show("Insufficient Funds")
Label3.Text = Label3.Text - servicecharge
End If
End If
If RadioButton3.Checked = True Then
Label3.Text = Label3.Text - servicecharge
End If
4
Contributors
4
Replies
5
Views
10 Years
Discussion Span
Last Post by matale
0

the type of textbox.text and label.text is string , i think u need to Convert it to integer or double

0

I believe i tried , but im gettings errors, still, haveing suggestions, I appreciate your time and effort.

Dim servicecharge As Integer
Dim transaction As Integer
Dim Balance As Integer
' Declare the value of service charge
servicecharge = 10
transaction = TextBox1.Text
' Deposit Funds to the account
If RadioButton1.Checked = True Then
Balance = Int32.Parse(TextBox2.Text) + Int32.Parse(TextBox1.Text)
End If
 
If RadioButton2.Checked Then
If Int32.Parse(TextBox2.Text) > Int32.Parse(TextBox1.Text) Then
Balance = Int32.Parse(TextBox2.Text) - Int32.Parse(TextBox1.Text)
ElseIf Int32.Parse(TextBox1.Text) > Int32.Parse(TextBox2.Text) Then
MessageBox.Show("Insufficient Funds")
Balance = Int32.Parse(TextBox2.Text) - servicecharge
End If
End If
If RadioButton3.Checked = True Then
Balance = Int32.Parse(TextBox2.Text) - servicecharge
End If
0

Specifically what errors are you getting? When the program breaks look into the output window. It should throw an error like System.IO.InvalidCastException (just an example)

0

The section for radiobutton2 does not work properly
Usually it returns either nothing or it wil display the msgbox insuficient funds, and wont debi if its proper

ElseIf TextBox1.Text.[B]ToString[/B] > Label3.Text Then

Is that ToString supposed to be there?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.