Hmm, not sure how to put this really.. I wanna know if it's possible to generate a WHOLE list of the possible combinations you can make using 0-9.. An I want it to remove doubles if there are any.. Is there ANYWAY at all this coule be done?
Printable View
Hmm, not sure how to put this really.. I wanna know if it's possible to generate a WHOLE list of the possible combinations you can make using 0-9.. An I want it to remove doubles if there are any.. Is there ANYWAY at all this coule be done?
for sure you can, how many digits you want
Oops, sorry I thought I posted how many I wanted. I wanna generate every possible 8 digit number using 0-9.. Thanks :).
sure you can, use a nested loop to do that
Erm, explain? :\
Where are you going to store 100 million numbers?
VB Code:
Dim i as Long For i = 0 to 99999999 '.. Next
Quote:
Originally Posted by jcis
See, I tried that once before I posted here.. I tried everything.. I don't need it to start at 0 I need it to start at 00000000 and end at 99999999... Every digit has to be 8 digits long..
VB Code:
Dim i As Long For i = 0 To 99999999 MsgBox Format$(i, "00000000") Next
Heh.. Anyway at all to make VB not freeze for this?
try adding a DoEvents inside the loop, and what are you doing with that values? That's why I asked if you're storing them somewhere or what, the MsgBox is just an example it shouldn't be there.
try
VB Code:
do while i< 99999999 doevents Dim i As Long For i = 0 To 99999999 MsgBox Format$(i, "00000000") Next loop
Why you added another loop if you already have one?Quote:
Originally Posted by damasterjo
Yea, he is right. theQuote:
Originally Posted by damasterjo
Still made it freeze so I took that out and added the doevents into the for loop and it works fine. Thanks both of you guys.. :)Code:do while i < 99999999
'blah blah
loop
well that will make it loop through everything in the loop, if there was more than one thing, and prevent it from locking up. I learned that early on when programming my game..Quote:
Originally Posted by jcis