Check a checkbox when an item in a combobox is selected

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TensE
    New Member
    • Nov 2013
    • 3

    Check a checkbox when an item in a combobox is selected

    How do I make specific checkboxes be checked when I select an entry in a combobox? Like if I select entry 1 checkbox 1 and 3 will be checked if entry 2 then 3 and 4 be checked? So far I'm encountering a problem that when I change the combobox entry the checboxes that were checked stay checked.

    Here's the code from the sub it's related to if that helps

    Code:
    Private Sub getProgramsNamount(strProgID As String, dblDuration As Double)
       Dim strProgramName As String
       Dim dblPrice As Double
    
        If strProgID.Contains("N") Then
           strProgramName = "None"
        End If
    
        If strProgID.Contains("C") Then
           strProgramName = "Cycling "
           dblPrice = dblDuration * 10
        End If
    
        If strProgID.Contains("W") Then
           strProgramName = strProgramName + "Weight Loss "
           dblPrice = dblPrice + (dblDuration * 15)
        End If
    
        If strProgID.Contains("K") Then
           strProgramName = strProgramName + "Kick Boxing"
           dblPrice = dblPrice + (dblDuration * 25)
        End If
Working...