LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,688
Default Compile error

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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Solver - error - Compile Error Nina Excel Discussion (Misc queries) 0 August 19th 08 09:41 PM
help with this error-Compile error: cant find project or library JackR Excel Discussion (Misc queries) 2 June 10th 06 09:09 PM
VBA Error Message "Compile Error...." Steve Excel Discussion (Misc queries) 3 July 15th 05 09:20 AM
How do I get rid of "Compile error in hidden module" error message David Excel Discussion (Misc queries) 4 January 21st 05 11:39 PM


All times are GMT +1. The time now is 02:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"