Below the code to get to Rule2() works and I have similar code for 10 other functions named Teat1() thru Test10()
I am trying to streamline all this code into a simple loop calling each Function in turn until I get a True result
The test for the modified code for Rule1() comes first
Do
CanBeChangeFlag = False 'exit only after a complete pass with no change
If CanBeChangeFlag = False Then
x = 1
If Evaluate("Rule" & x & "()") = True Then
CanBeChangeFlag = True
End If
End If ' See if any cell has only one possible candidate
If CanBeChangeFlag = False Then ' Rule 2: Only once in mode M
CanBeChangeFlag = Rule2()
End If
.
.
Loop Until CanBeChangeFlag = True
..
Function Rule1()
Rule1 = False
For I = 1 To 9: For J = 1 To 9
CanLoc = ((I - 1) * 9) + J
If CanLoc = 48 Then
Z$ = ""
End If
If Len(CanB$(CanLoc)) = 2 Then 'Only 1 # in a CanB entry, it Must Be
Rule1 = True: Actn$ = "Only choice for cell"
TNum = Val(Left(CanB$(CanLoc), 1))
If PostChoice(TNum, I, J, Actn$) = False Then End
J = 10: I = 10
End If
Next J: Next I
End Function 'Rule1