I have 99 buttons on a page of which I need to be able to perform a sweeping change of their .text and .tag properties. For convenience I have named the buttons "btnButton1" through "btnButton99". There are other buttons on the form I do not wish to change. I figure the easiest way to do this is through a routine as follows:
dim x as int16
dim ButtonName as string
for x = 1 to 99
ButtonName = "form.btnbutton" & ltrim(str(x)) set the specific button
ButtonName.text = "sometext"
ButtonName.tag = "sometag"
next x
Is something like this feasable in VB .NET? I realize that the variable at this time is a string and would have to have its type changed to a control however Im not sure if this can be done so that it is the content of the variable which is referenced as the control.
dim x as int16
dim ButtonName as string
for x = 1 to 99
ButtonName = "form.btnbutton" & ltrim(str(x)) set the specific button
ButtonName.text = "sometext"
ButtonName.tag = "sometag"
next x
Is something like this feasable in VB .NET? I realize that the variable at this time is a string and would have to have its type changed to a control however Im not sure if this can be done so that it is the content of the variable which is referenced as the control.