Here is a code example of how you might handle that with 3 groups of option buttons (instead of check boxes) on the same tab
Create 3 option buttons named wattage_1, wattage_2,wattage_3
Set the value of wattage_1 = true
Give them all the same group name. (ex wattage)
The name won't matter
Create 2 option buttons named type_1, type_2 (for hvac or heater)
Set the value of type_1 = true
Give those two the same group name (ex type)
Create 3 option buttons named color_1, color_2,color_3
Set the value of color_1 = true
Give them all the same group name. (ex color)
Put a control button on the form
Use this code
Dim wattage As Integer
Dim HVAC_or_Heater As Integer
Dim color As Integer
Private Sub CommandButton1_Click()
'do something based on the 3 variables
'EXAMPLE:
Range("A1") = Choose(wattage, "7.6Kwh", "15 Kwh", "23 Kwh")
Range("A2") = Choose(HVAC_or_Heater, "HVAC", "Heater Only")
Range("A3") = Choose(color, "Red", "White", "Blue")
End Sub
Private Sub UserForm_Initialize()
wattage = 1
HVAC_or_Heater = 1
color = 1
End Sub
Private Sub wattage_1_Click()
wattage = 1
End Sub
Private Sub wattage_2_Click()
wattage = 2
End Sub
Private Sub wattage_3_Click()
wattage = 3
End Sub
Private Sub type_1_Click()
HVAC_or_Heater = 1
End Sub
Private Sub type_2_Click()
HVAC_or_Heater = 2
End Sub
Private Sub color1_Click()
color = 1
End Sub
Private Sub color2_Click()
color = 2
End Sub
Private Sub color3_Click()
color = 3
End Sub
When you hit the command button (call it the enter button) you'll have the wattage, type and color variables available in your code.
Bookmarks