I'm getting too many iterations in RUNCELLVALUES, but
cannot track down the reason.
Anyone have an idea?
Sub RunTotalCount()
TotalCount = 0
RunCellValues 1, Min1, Max1, Step1, False
End Sub
Sub RunCombinations()
RunTotalCount
RunCellValues 1, Min1, Max1, Step1, True
End Sub
Sub RunCellValues(ByVal iIndex As Integer, Action)
If iIndex > SRange.Count Then Exit Sub
Dim ivalue As Integer
Dim Min, Max, S As Double
If iIndex <= SRange.Columns.Count Then
Min = Min1
Max = Max1
S = Step1
Else
Min = Min2
Max = Max2
S = Step2
End If
For ivalue = Min To Max Step S
If Action Then
SRange(iIndex).Value = ivalue
Else
TotalCount = TotalCount + 1
End If
RunCellValues iIndex + 1, Action
Next ivalue
End Sub