Hello all!
Firstly, sorry, it's been a while since I've been programming and I'm relatively new to VB
My question is this;
I want to change the number in an object identifier to what ever number the program picks at random.
Roulette, 37 spots on the wheel, random number 1-37, and there are 37 images which can be displayed in accordance to that.
Now, to save myself from writing out 37 If commands, I'd like to know if there is a way to get around that.
the object identifiers are W1, W2, W3, W4.......W37
[
Dim digx As Integer = 2
Dim NUM As Integer
Dim WPos As String
Randomize()
NUM = Int(((4 + 1) - 1) * Rnd() + 1)
Me.DNUM.Text = NUM
Me.PWheel.BringToFront()
WPos = "W" & NUM
Me.TB.Text = WPos
]
(only doing 1-4 to keep it simple for now)
everything works there great so far. I can get the output i want being "w"x. But when trying to reference that string value to an object, ie [ me.WPos.BringToFront () ] it doesn't like that.
Any way to fix that?