Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How i can refer a group of controls?
for eg. in mu userform when clicking a button i have to hide a few labels, textboxes and comboboxes. instead of saying textbox1 visible =false and combobox1 visible =false etc to refere each control is there a way I can group them and refer them in a single line? thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Put a distinctive set of characters in the names of the controls you
want to make not visible, such as zz, so rename textbox1 textboxzz1, for instance, and so on. Then you can refer to them like this: Dim ctrl As Control For Each ctrl In Controls If InStr(ctrl.Name, "zz") 0 Then ctrl.Visible = False Next ctrl James Abdul wrote: How i can refer a group of controls? for eg. in mu userform when clicking a button i have to hide a few labels, textboxes and comboboxes. instead of saying textbox1 visible =false and combobox1 visible =false etc to refere each control is there a way I can group them and refer them in a single line? thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Another way might be to put the related controls in a Frame
Me.Frame1.Visible = bVis You could disguise the frame by removing its caption and setting its border colour to same as the form. Regards, Peter T "Abdul" wrote in message ups.com... How i can refer a group of controls? for eg. in mu userform when clicking a button i have to hide a few labels, textboxes and comboboxes. instead of saying textbox1 visible =false and combobox1 visible =false etc to refere each control is there a way I can group them and refer them in a single line? thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Group controls | Excel Programming | |||
Is it possible to group parts with controls? | Excel Discussion (Misc queries) | |||
Event procedures for controls added with Controls.Add | Excel Programming | |||
Group Controls | Excel Programming | |||
group name for form controls | Excel Programming |