tqm1
06-15-2007, 05:04 AM
Dear Experts
On userform1, when I call totals then compiler displays following error message
Sub or Function not defined
and debug window indicate to this line
F2 = CountIf(E, F1)
How to overcome this problem?
Sub TOTALS()
Dim FI As Long, F2 As Long, F3 As Long, F4 As Long, F5 As Long
With Sheets("weights")
F1 = Me.TextBox2.Value
F2 = CountIf(E, F1)
F3 = F5 = SumProduct((E = F1) * (N = 0) * 1)
F4 = SumIf(E, F1, M)
F5 = SumProduct((d = F1) * (M = 0) * 1)
Me.TextBox19.Value = F2
Me.TextBox20.Value = F3
Me.TextBox21.Value = F5
Me.Label23.Caption = CStr(F4)
End With
End Sub
On userform1, when I call totals then compiler displays following error message
Sub or Function not defined
and debug window indicate to this line
F2 = CountIf(E, F1)
How to overcome this problem?
Sub TOTALS()
Dim FI As Long, F2 As Long, F3 As Long, F4 As Long, F5 As Long
With Sheets("weights")
F1 = Me.TextBox2.Value
F2 = CountIf(E, F1)
F3 = F5 = SumProduct((E = F1) * (N = 0) * 1)
F4 = SumIf(E, F1, M)
F5 = SumProduct((d = F1) * (M = 0) * 1)
Me.TextBox19.Value = F2
Me.TextBox20.Value = F3
Me.TextBox21.Value = F5
Me.Label23.Caption = CStr(F4)
End With
End Sub