You're testing if ctrl is a label, therefore within those nested IF's it cannot be a checkbox as well.
I don't recognize some of the words you've used there, such as label or checkbox as a control type. Methinks it's acCheckbox and acLabel. I also think that TypeOf is an operator that's used to return the data type of an expression. However, if you use TypeName(ctrl) then checkbox, label or textbox would be valid. The property name of an object is not the same as the type property.
Last edited by Micron; 05-01-2025 at 10:31 AM.
Reason: clarification
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.