P
Phill
is it possible to create an array of objects.
Eg.
lets say i have 50 textboxes on a form all with the same
name and numbered from 1 to 50.
eg. Textbox1, Textbox2 ... Textbox50
I need to access them individually to run code that makes
them all invisible bar 1 at a certain point.
I'm trying to use the following code although its not
working because it doesn't recognise the object.
For MyTextNumber = 1 to 50
Textbox(MyTextNumber).visible = false
Next
I've also tried
Textbox & MyTextNumber.visible = false
is there anyway object names can be broken into a basename
and variable to work with.
any help would be gratefully appreciated!
thanks
Phill
Eg.
lets say i have 50 textboxes on a form all with the same
name and numbered from 1 to 50.
eg. Textbox1, Textbox2 ... Textbox50
I need to access them individually to run code that makes
them all invisible bar 1 at a certain point.
I'm trying to use the following code although its not
working because it doesn't recognise the object.
For MyTextNumber = 1 to 50
Textbox(MyTextNumber).visible = false
Next
I've also tried
Textbox & MyTextNumber.visible = false
is there anyway object names can be broken into a basename
and variable to work with.
any help would be gratefully appreciated!
thanks
Phill