Hello,
I have a form with 14 comboboxes. 12 of the comboboxes are used to calculate a total score. The other two comboboxes are unbound and are named cboStatus and cboEmployee. I need help modifying the current code I have that loops through the comboboxes on the form and calculates the score to ignore the cboStatus and cboEmployee comboboxes.
I really appreciate any help you are able to give me!
Code:Private Sub btnCalculate_Click() Dim target_control As Control Dim control_value As Integer Dim control_count As Integer control_value = 0 control_count = 0 For Each target_control In Me.Controls If TypeName(target_control) = "ComboBox" Then If Not target_control.Value = "N/A" Then MsgBox (target_control.Name & ", " & target_control.Value) control_value = control_value + CInt(target_control.Value) control_count = control_count + 1 End If End If Next txtPotential = control_count * 4 txtScore = Format((control_value / txtPotential), "Percent")