Hello everyone.
I have a select case statement about a randnum integer variable
Select Case randNum1
Case 1
pb1.Image = My.Resources.dice1
Case 2
pb1.Image = My.Resources.dice2
Case 3
pb1.Image = My.Resources.dice3
Case 4
pb1.Image = My.Resources.dice4
Case 5
pb1.Image = My.Resources.dice5
Case 6
pb1.Image = My.Resources.dice6
End Select
And I want this statement to use it for multiple variables so that not to write too much code... like the following example. Is it possible and how??? Any help will be much appreciated.
Select Case randNum1, randNum2, randNum3, randNum4, randNum5, randNum6 etc
case randNum1 = 1
pb1.image=My.Resources.dice1
case randNum2 = 1
pb2.image = My.Resources.dice1
case randNum1 = 2
pb1.image = My.Resources.dice2
case RandNum2 = 2
pb2.image = My.Resources.dice
.
.
.
end case
I have a select case statement about a randnum integer variable
Select Case randNum1
Case 1
pb1.Image = My.Resources.dice1
Case 2
pb1.Image = My.Resources.dice2
Case 3
pb1.Image = My.Resources.dice3
Case 4
pb1.Image = My.Resources.dice4
Case 5
pb1.Image = My.Resources.dice5
Case 6
pb1.Image = My.Resources.dice6
End Select
And I want this statement to use it for multiple variables so that not to write too much code... like the following example. Is it possible and how??? Any help will be much appreciated.
Select Case randNum1, randNum2, randNum3, randNum4, randNum5, randNum6 etc
case randNum1 = 1
pb1.image=My.Resources.dice1
case randNum2 = 1
pb2.image = My.Resources.dice1
case randNum1 = 2
pb1.image = My.Resources.dice2
case RandNum2 = 2
pb2.image = My.Resources.dice
.
.
.
end case