I have 12 labels on my form named lblWorkOrder1, lblWorkOrder2, etc. I want to be able to use a for loop to manipulate the controls using the following code:
For x = 1 to 12
controlname = "lblWorkOrder" & x
controlname.Visible = False
Next x
The compiler gives me an "invalid qualifier" error, because a string doesn't have a visible attribute. Any ideas on how I can get around this? Thanks!
For x = 1 to 12
controlname = "lblWorkOrder" & x
controlname.Visible = False
Next x
The compiler gives me an "invalid qualifier" error, because a string doesn't have a visible attribute. Any ideas on how I can get around this? Thanks!