Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,564
- Office Version
- 365
- 2016
- Platform
- Windows
In my userform, I have 10 frames each with a variety of controls (textboxes, comboboxes, check boxes) in each specific to that frame. Some frames have as little as 4 controls, others as many as 15.
Is there an efficient way that I can clear the values of each of these controls in just the frames (not the entire form) rather than having to code each control's property individually? Ihave this pseudo code below, but I suspect I can't simply isolate groups of controls based on their unique frame.
Pseudo code:
Is there an efficient way that I can clear the values of each of these controls in just the frames (not the entire form) rather than having to code each control's property individually? Ihave this pseudo code below, but I suspect I can't simply isolate groups of controls based on their unique frame.
Pseudo code:
Rich (BB code):
With Me
For frm = 1 to 10
nameFrm = ? frame name of frm(i) ? 'eg frm2d_setup_exp10
for each control in nameFrm 'loop through each of the 12 controls in frm2d_setup_exp10
if control is a textbox value = false
if control is a combobox or textbox value = ""
next
Next frm
End With
Last edited: