By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,327 Members | 849 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,327 IT Pros & Developers. It's quick & easy.

Check a checkbox when an item in a combobox is selected

P: 3
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

Expand|Select|Wrap|Line Numbers
  1. Private Sub getProgramsNamount(strProgID As String, dblDuration As Double)
  2.    Dim strProgramName As String
  3.    Dim dblPrice As Double
  4.  
  5.     If strProgID.Contains("N") Then
  6.        strProgramName = "None"
  7.     End If
  8.  
  9.     If strProgID.Contains("C") Then
  10.        strProgramName = "Cycling "
  11.        dblPrice = dblDuration * 10
  12.     End If
  13.  
  14.     If strProgID.Contains("W") Then
  15.        strProgramName = strProgramName + "Weight Loss "
  16.        dblPrice = dblPrice + (dblDuration * 15)
  17.     End If
  18.  
  19.     If strProgID.Contains("K") Then
  20.        strProgramName = strProgramName + "Kick Boxing"
  21.        dblPrice = dblPrice + (dblDuration * 25)
  22.     End If
  23.  
Nov 8 '13 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.