B
Bails
Hi all. I am trying to write some code for a "Lotto" program (hey its a bit
of fun) It creates 3 profiles of numbers and extrapolates a full 36 game
card from them.
On the 3rd profile ask's a question like "please enter a number between 15
and 36, but one that has NOT been used in Profile 1 or 2".
Then I wanted to offer some suggestions in a statusbar. I tried running a
for next loop starting at 15 and finishing at 36 steping 1 at time and
displaying the result in the status bar. HOWEVER I wanted to exclude any
numbers that had already been provided in the previous profiles.
I have listed the code below but keep getting errors as I have a Next
without for command. How can I re-write it so it works.
Also, how can I get the numbers to appear next to each other along the
Status Bar without having to assign them to a new bar each time. I vaguely
remember being able to put a semi colon ( at the end of a statement to
indicate that the next number should append to there, but this doesnt work
in .net.
THANKS IN ADVANCE.
For iCounter = 15 To 36 Step 1
Select Case iCounter
case = iFirstNumber Or iSecondNumber Or iThirdNumber Or iFourthNumber Or
iFifthNumber Or iSixthNumber Then
next icounter
Case Else
iSuggestion = iCounter
StatusBar1.Text = iSuggestion;
End Select
Next iCounter
of fun) It creates 3 profiles of numbers and extrapolates a full 36 game
card from them.
On the 3rd profile ask's a question like "please enter a number between 15
and 36, but one that has NOT been used in Profile 1 or 2".
Then I wanted to offer some suggestions in a statusbar. I tried running a
for next loop starting at 15 and finishing at 36 steping 1 at time and
displaying the result in the status bar. HOWEVER I wanted to exclude any
numbers that had already been provided in the previous profiles.
I have listed the code below but keep getting errors as I have a Next
without for command. How can I re-write it so it works.
Also, how can I get the numbers to appear next to each other along the
Status Bar without having to assign them to a new bar each time. I vaguely
remember being able to put a semi colon ( at the end of a statement to
indicate that the next number should append to there, but this doesnt work
in .net.
THANKS IN ADVANCE.
For iCounter = 15 To 36 Step 1
Select Case iCounter
case = iFirstNumber Or iSecondNumber Or iThirdNumber Or iFourthNumber Or
iFifthNumber Or iSixthNumber Then
next icounter
Case Else
iSuggestion = iCounter
StatusBar1.Text = iSuggestion;
End Select
Next iCounter