Vb net excel screenupdating singles and dating webs

18 Mar

In paragraph 2 (a) of my post #1 above, I had indicated that the two would be in one worksheet.I would rather have them in separate worksheets so as not to create problems for myself.If you remember the title of your thread and let me know, I will be glad to search for it.Meanwhile, I mentioned the matter to a colleague in a phone chat, a few minutes before I started doing this post #3.Meanwhile, I’ve received the code I was promised, and I’ve pasted it below for your examination: Code: Sub write Nums() Dim i As Integer, j As Integer, k As Integer, l As Integer, m As Integer, n As Integer, counter As Long ' create array to hold numbers required in 30 unique placeholders Dim arr Vals() Re Dim arr Vals(1 To 30) Dim x As Integer For x = 1 To 30 arr Vals(x) = Range("numbers"). Value ' swap (1,x) to (x,1) if using column instead of row Next x counter = 1 ' avoids header row ' write all unique combinations of numbers For i = 1 To 25 For j = i 1 To 26 For k = j 1 To 27 For l = k 1 To 28 For m = l 1 To 29 For n = m 1 To 30 counter = counter 1 Cells(counter, 1) = arr Vals(i) Cells(counter, 2) = arr Vals(j) Cells(counter, 3) = arr Vals(k) Cells(counter, 4) = arr Vals(l) Cells(counter, 5) = arr Vals(m) Cells(counter, 6) = arr Vals(n) Application.Status Bar = Format(counter, "0,000,000") Next n Next m Next l Next k Next j Next i Application.If you can please help with this matching part (see my post #1 paragraph 3), I will be very happy.

d) Finally, if ONLY 5 of the drawn numbers (without the bonus) are matched in columns A to F, the 5 numbers will be coloured RED, and the number “5” inserted in column H for that row. Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next Hi Pete, I did a search on the VB6 forum for ‘generating number combinations’ and only 5 threads came up.

He told me that he might have a code - written for him by an old friend programmer - that would help me with the first part – i.e.

generating the combinations; that the code would have each set of 6 numbers placed (each number) in a cell (e.g.

Column Filter Value = Cells(R, Filter Column) Application.

1) Firstly I have 30 non-consecutive numbers, and I need a code that will generate all possible 6-number combinations out of the 30 numbers.