I wrote a program where the user can build their own phone plan. They have a two checkboxes that allows them to add email and text messages to their plan. If they want only email, it will be an extra $25. If they only want txt messages, it will be an additional $10. If they check both boxes, it should amount to $35. My code works when they only click one of the checkboxes but not both. When the user checks off both, it returns 25 instead of 35. I'll include the part of the code that is relevant to the question below.
If chkEmail.Checked = True Then
dblOptions = 25
ElseIf chkTxt.Checked = True Then
dblOptions = 10
ElseIf chkEmail.Checked = True And chkTxt.Checked = True Then
dblOptions = 35
End If
Aucun commentaire:
Enregistrer un commentaire