Compile error

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
 
B

Biff

See, I told you I wasn't much(any!) good at VBA.
Those little hints really go a long way! Thanks Alan.

Biff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top