|
Private Sub CommandButton1_Click()
Dim d As Object, dc As Object
Set d = CreateObject("scripting.dictionary")
Dim ob As OLEObject
ar = Array("ComboBox13", "ComboBox2", "ComboBox36", "ComboBox4", "ComboBox51", "ComboBox7", "ComboBox18", "ComboBox9", "ComboBox10", "ComboBox22")
For i = 0 To UBound(ar)
d(ar(i)) = ""
Next i
For i = 0 To UBound(ar)
Mc = ar(i)
If Me.Controls(Mc).Text = "ON" Then
n = n + 1
End If
Next i
For i = 2 To 11
sl = Me.Controls("TextBox" & i)
If ls <> "- - -" Then
m = m + Val(sl)
End If
Next i
TextBox1.Text = n
TextBox12.Text = m
End Sub
|
|