I am making an order form and I have a section of options that are checkboxes. I want to add the options (if they are selected) together and add them to the total. How can I do that?
2007-04-20
04:09:35
·
4 answers
·
asked by
Anonymous
in
Computers & Internet
➔ Programming & Design
I'm still confused. This is what I have right now and it's only counting the first one checked:
Private Function ExtrasPrice() As Double
Dim price As Double = 0
If CheckBox1.Checked Then
price = THICK_ENVELOPES
End If
If CheckBox2.Checked Then
price = ENVELOPE_SEALS
End If
If CheckBox3.Checked Then
price = FOIL_ENVELOPES
End If
If CheckBox4.Checked Then
price = STAMPS_PRICE
End If
If CheckBox5.Checked Then
price = LABELS_PRICE
End If
Return price
End Function
2007-04-20
04:26:15 ·
update #1