Multiple VBA Objects with Expression "C"

I have a checkbox that when checking multiple mailboxes is disabled in my form. I am currently using

With Me!Textbox
.Locked = True

Is there a method in which I can list several objects inside a WITH statement, and not write for each text field every time

eg.

With Me!Text1, Text2, Text3
+3
source share
1 answer

It may be easiest to add something to the tag property to identify the appropriate controls, for example, “block”. Then you can iterate over the collection of controls and lock anything with the tag set to "lock".

+2
source

All Articles