So, this might be simple but I seem to be missing it.
I am trying to figure out how to use variables to define which object to update. I could of course use a case statement to pick the object based on a variable, but it seems to me like there should be a more direct way. Here is a smaller example of what I would like to do.
In my form I have 4 picture boxes (pbox1, pbox2, pbox3, and pbox4). I then want to change the image in one of the boxes, but the box I want to change will be determined by a variable (say maybe a randomly generated number). Is there some way to dynamically concatenate the "pbox" with the number that VB would understand it and use it as an object?
In this example I could easily build a case statement to handle the selection, but in my real program there will be many more than 4 options.
Any thoughts, advice or anything else would be great. Or am I crazy?
Edit: Ack!!! and I cant even spell Variables!
Edited 6 Years Ago by Derkus: Bad spelling