Everything works fine except I need to have "Package A,B,C" in front of the numbers outputted to the new window, I can't seem to figure out how to do this. Any help would be great.
Here's my btnCalculate coding.
Here's my btnCalculate coding.
Dim decPa As Double
Dim decPb As Double
Dim decPc As Double
Dim decTotal As Double
If IsNumeric(txtPackageA.Text) = False Then
MessageBox.Show("This must be a numeric number", "Error")
Return
End If
If IsNumeric(txtPackageB.Text) = False Then
MessageBox.Show("Package B must be a numeric number", "Error")
Return
End If
If IsNumeric(txtPackageC.Text) = False Then
MessageBox.Show("Package C must be a numeric number", "Error")
Return
End If
decPa = CDec(txtPackageA.Text)
decPb = CDec(txtPackageB.Text)
decPc = CDec(txtPackageC.Text)
If decPa >= 10 And decPa <= 19 Then
decPa = (decPa * 99) * 0.8
ElseIf decPa >= 20 And decPa <= 49 Then
decPa = (decPa * 99) * 0.7
ElseIf decPa >= 50 And decPa <= 99 Then
decPa = (decPa * 99) * 0.6
Else
decPa = (decPa * 99) * 0.5
End If
If decPb >= 10 And decPb <= 19 Then
decPb = (decPb * 199) * 0.8
ElseIf decPb >= 20 And decPb <= 49 Then
decPa = (decPb * 199) * 0.7
ElseIf decPb >= 50 And decPb <= 99 Then
decPb = (decPb * 199) * 0.6
Else
decPb = (decPb * 199) * 0.5
End If
If decPc >= 10 And decPc <= 19 Then
decPc = (decPc * 299) * 0.8
ElseIf decPc >= 20 And decPc <= 49 Then
decPc = (decPc * 299) * 0.7
ElseIf decPc >= 50 And decPc <= 99 Then
decPc = (decPc * 299) * 0.6
Else
decPc = (decPc * 299) * 0.5
End If
decTotal = decPa + decPb + decPc
If radGrandTotal.Checked = True Then
MessageBox.Show(FormatCurrency(decTotal), "Amount of Order")
Else
MessageBox.Show(FormatCurrency(decPa) & ControlChars.CrLf & FormatCurrency(decPb) & ControlChars.CrLf & FormatCurrency(decPc) & ControlChars.CrLf & FormatCurrency(decTotal), "Amount of Order")
End If