Hi y'all, hope someone can help me with this
What I've got is a form with a bunch of different controls on it
Certain controls need to preclude other controls from being enabled ie one combobox selection will disable a set of checkboxes and enable another combobox
so........
what I'm looking for is how to set up a For Each....Next loop that loops through the controls on a form, decides whether they're a checkbox or not and then diasables them if they are. I can do all of the above except, it seems, to reference the set of controls correctly. Can't seem to find the right syntax for checking the TYPE of control (ie checkbox)
eg
dim ctrl as control
For Each ctrl in me.Controls
if ctrl. type = xlcheckbox ---this is where i need the right syntax
then do stuff
else
end if
TIA
Geoff HTH
~Geoff~
What I've got is a form with a bunch of different controls on it
Certain controls need to preclude other controls from being enabled ie one combobox selection will disable a set of checkboxes and enable another combobox
so........
what I'm looking for is how to set up a For Each....Next loop that loops through the controls on a form, decides whether they're a checkbox or not and then diasables them if they are. I can do all of the above except, it seems, to reference the set of controls correctly. Can't seem to find the right syntax for checking the TYPE of control (ie checkbox)
eg
dim ctrl as control
For Each ctrl in me.Controls
if ctrl. type = xlcheckbox ---this is where i need the right syntax
then do stuff
else
end if
TIA
Geoff HTH
~Geoff~