im trying to do this assignment for skool and i have completely forgot how to do this. i have 2 pic boxes and 1 button wen i click that button i want it to get a random number diff one for both but it can sumtimes be the same but the number will be from 1 - 6 and if it = 1 then i have a pic of a dice face that has a number 1 on it and if it = 2 then a dice pic with 2 on it and so on but i dont kno how to get it to do any of that i was using like select case but im stuck plz help
Example from my project. I get this code from online friends.
[HTML]
Private Sub HidePicture()
Dim MyCondition As Integer
If cmbShape = "Angle" Then
MyCondition = 1
ElseIf cmbShape = "Circle" Then
MyCondition = 2
ElseIf cmbShape = "Circular Tube" Then
MyCondition = 3
ElseIf cmbShape = "Hexagon (A/F)" Then
MyCondition = 4
ElseIf cmbShape = "Hexagon (A/C)" Then
MyCondition = 5
ElseIf cmbShape = "Hollow Rectangle" Then
MyCondition = 6
ElseIf cmbShape = "I-Beam" Then
MyCondition = 7
ElseIf cmbShape = "Octagon (A/F)" Then
MyCondition = 8
ElseIf cmbShape = "Octagon (A/C)" Then
MyCondition = 9
ElseIf cmbShape = "Rectangle" Then
MyCondition = 10
ElseIf cmbShape = "Square" Then
MyCondition = 11
ElseIf cmbShape = "Tee Section" Then
MyCondition = 12
ElseIf cmbShape = "U-Channel" Then
MyCondition = 13
Else
End If
Show_PBox MyCondition
End Sub
Sub Show_PBox(Index As Integer)
' Hide all pictureboxes
Dim i As Integer
For i = 0 To 12
picShape(i).Visible = False
Next i
' Show the requested picturebox
picShape(Index - 1).Visible = True
End Sub
[/HTML]