Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim servicecharge As Integer
' Declare the value of service charge
servicecharge = 10
' Deposit Funds to the account
If RadioButton1.Checked = True Then
Label3.Text = TextBox1.Text
End If
' Process a cheque through the account, confirming sufficient funds, If returned NSF the account
' will not be deducted the amount of the cheque, but will be charged 10 dollars.
If RadioButton2.Checked = True Then
Label3.Text = Label3.Text - TextBox1.Text
ElseIf TextBox1.Text > Label3.Text Then
MessageBox.Show("Insufficient Funds")
Label3.Text = Label3.Text - servicecharge
End If
' Service charge processed on the account.
If RadioButton3.Checked = True Then
Label3.Text = Label3.Text - servicecharge
End If
End Sub