sharky12345
Well-known Member
- Joined
- Aug 5, 2010
- Messages
- 3,404
- Office Version
- 2016
- Platform
- Windows
I'm trying to work out how to loop through all labels contained in a frame on a userform.
I currently have this:
What I need to add, and what I am struggling to work out, is how to loop through all labels within the frame and disable them. There are a lot of labels in each frame so want to avoid having to list each one and disable it, which I know I can do as a last resort.
Thank you!
I currently have this:
VBA Code:
For i = 3 To 10
Me.Controls("Frameobject" & i).Enabled = False
Me.Controls("textrationale" & i).Enabled = False
Me.Controls("textrationale" & i).Value = ""
Next
Exit Sub
End If
What I need to add, and what I am struggling to work out, is how to loop through all labels within the frame and disable them. There are a lot of labels in each frame so want to avoid having to list each one and disable it, which I know I can do as a last resort.
Thank you!