I cannot tweak that macro. It is the fastest one I've found.
I have been playing the lotterys for 40 years or more and we have 4 draws a week here from 45 numbers and one draw with 38 numbers and the best I have ever done is hit 5 numbers in powerball for $54000 win using 15 number combination.
A 6 / 49 lotto has 13983816 combinations - a 40 number lotto
of 3838380 leaves a massive 10,145,436 combinations uncovered.
You can pick 40 numbers out of 49 and most likely miss out on the big one.
Your playing a futile game that is only for fun and no matter what you read in books, There is no easy way to win lotto.
The game is made for the organisers not the player.
Download a lotto trial of (Lottery Statistic Anaylser) easily found on google.
It has a Combination Creator which has about the same speed as the macro.
If you have a fast computer the combinations are generated in 8 minutes. or so but then you have to break the lines up to whatever excel you are using. 60 rows if your using 2003, 4 if your 2007 or later.
The macro I posted does it for you.
Our lotto has over 4000 draws so yours with only 990 draws is a long way off. No 2 draws in Australia have ever duplicated, 5 numbers in a draw has about 20 times but it has happened in America were 6 numbers have repeated also in Bulgaria, The Bulgarian lottery different order but exact same numbers, in the same week.
Story here
Code:
http://news.bbc.co.uk/2/hi/8259801.stm
The only tweaking I can suggest is change these lines to single 0
and the - to a space which saves a bit with the single 0 the - doesn't really do anything
Code:
ActiveCell.Value = Application.WorksheetFunction.Text(A, "0") & " " _
& Application.WorksheetFunction.Text(B, "0") & " " _
& Application.WorksheetFunction.Text(C, "0") & " " _
& Application.WorksheetFunction.Text(D, "0") & " " _
& Application.WorksheetFunction.Text(E, "0") & " " _
& Application.WorksheetFunction.Text(F, "0")