title: Make the second combo-box item selected based on item selection of first combo box
body: <p>I'm trying to update the combo box <strong>cbo_moduleName</strong> based on the selection made in <strong>cbo_moduleCode</strong>. Right now the user has to select the combo box to make their selection but I want the first value found during the loop to be automatically filled "on the fly". Any idea on how I can achieve this? Here is my code so far:</p>
  
  <pre><code>Private Sub cbo_moduleCode_Change()
  
      Dim lLoop As Long
      ' Clear the comboboxes we are about to update
      Me.cbo_moduleName.Clear
  
      ' Loop through the worksheet and test each row
      For lLoop = 1 To Sheets("lookupModule").Range("A" &amp; Sheets("lookupModule").Rows.Count).End(xlUp).Row
          ' If the row's column A matches the combobox then add the corresponding values to other combos
          If Sheets("lookupModule").Range("A" &amp; lLoop).Value = Me.cbo_moduleCode.Value Then
              Me.cbo_moduleName.AddItem Sheets("lookupModule").Range("B" &amp; lLoop).Value
          End If
      Next lLoop
  
  End Sub
  </code></pre>