Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, that makes perfect sense, helped me out loads.
Thank you both! :) "Bob Phillips" wrote: Private MyLabels As Collection Private Sub cmdOK_Click() MyLabels(1).Visible = False End Sub Private Sub UserForm_Activate() Call Collection_Of_Labels End Sub Function Collection_Of_Labels() Dim Ctrl As MSForms.Control Dim collLabels As Collection Set MyLabels = New Collection For Each Ctrl In Me.Controls If TypeName(Ctrl) = "Label" Then MyLabels .Add Ctrl, Ctrl.Name End If Next Ctrl End Function -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "NateBuckley" wrote in message ... Hello I have 10 labels for example sake let us say they are named lbl1 lbl2 ... lbl9 lbl10 I need to make certain ones vanish on certain conditions and it would be easier if I could put them into an array, is there a way to make these objects but as an array? I think it'd be easier and shorter code to treat them this way in a loop I'm doing. Thanks for any help in advance! Nathan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
disable objects on form | Excel Programming | |||
Set array of objects to nothing | Excel Programming | |||
How to look at objects in the form | Excel Programming | |||
HELP! limit of objects on a form. | Excel Programming | |||
Dynamically Assign Objects to Form Objects. | Excel Programming |