B
Biff
Hi Folks,
I found this code doing a Google search and thought I'd
give it a try. Unfortunately, I get a compile error but I
am not much good when it comes to VBA.
Dim combo As String
numbers = Array(1, 2, 3, 4) 'enter numbers played here
For i = 0 To 3
For j = 0 To 3
For k = 0 To 3
For l = 0 To 3
If Not ((j = i) Or (k = j Or k = i) Or (L = k Or L = j Or
L = i))
Then
combo = numbers(i) & numbers(j) & numbers(k) & numbers(l)
ActiveCell = combo
ActiveCell.Offset(1, 0).Select
End If
Next l
Next k
Next j
Next i
End Sub
The error flags If Not ... Then
Any ideas?
Thanks!
Biff
I found this code doing a Google search and thought I'd
give it a try. Unfortunately, I get a compile error but I
am not much good when it comes to VBA.
Dim combo As String
numbers = Array(1, 2, 3, 4) 'enter numbers played here
For i = 0 To 3
For j = 0 To 3
For k = 0 To 3
For l = 0 To 3
If Not ((j = i) Or (k = j Or k = i) Or (L = k Or L = j Or
L = i))
Then
combo = numbers(i) & numbers(j) & numbers(k) & numbers(l)
ActiveCell = combo
ActiveCell.Offset(1, 0).Select
End If
Next l
Next k
Next j
Next i
End Sub
The error flags If Not ... Then
Any ideas?
Thanks!
Biff