Compile error

  • Thread starter Thread starter Biff
  • Start date Start date
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
 
See, I told you I wasn't much(any!) good at VBA.
Those little hints really go a long way! Thanks Alan.

Biff
 
Back
Top