lundi 6 avril 2015

Option Button If Statements not working

Need message box to print out the BoilerRate value corresponding to what the user chooses on the Option Buttons, but it keeps printing out 0. What should I be dimming the buttons as? What am I missing?


This code is written under the OK Button private sub:



If NatGas.Checked = True Then
BoilerRate = 0.34
ElseIf SixOil.Checked = True Then
BoilerRate = 1.26
ElseIf FourOil.Checked = True Then
BoilerRate = 0.99
ElseIf TwoOil.Checked = True Then
BoilerRate = 0.48
Else
BoilerRate = 0.34
End If
MsgBox BoilerRate


Thank you!


Aucun commentaire:

Enregistrer un commentaire