Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If a sheet has CheckBox1 .....CheckBox20 and you want to program to hide
certain ones based on some criteria. For example, making CheckBox5 to CheckBox9 Visible.False? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
There are checkboxes and checkboxes. The ones from the Forms toolbar are part of its Checkboxes collection, so you can address #5 as Checkboxes(5). The ActiveX boxes from the Controls toolbar are not, you have to deal with them one by one. -- HTH. Best wishes Harald Followup to newsgroup only please. "Don Madsen" wrote in message ... If a sheet has CheckBox1 .....CheckBox20 and you want to program to hide certain ones based on some criteria. For example, making CheckBox5 to CheckBox9 Visible.False? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just to add, for ActiveX boxes on a worksheet with name like textbox1 to
txtbox9 Dim obj as OleObject Dim tbox as MSForms.TextBox for each obj in Activesheet.OleObjects if typeof obj.Object is MSForms.Textbox then set tBox = obj.Object idx = clng(right(tbox.name,1)) if idx = 5 and idx <=9 then tbox.Value = "" end if End if Next On a userform Dim tbox as MSForms.TextBox dim ctrl as Control for each ctrl in Userform1.Controls if typeof ctrl is MSforms.TextBox then set tbox = ctrl End if Next or for i = 5 to 9 Userform1.Controls("Textbox" & i).Value = "" Next i -- Regards, Tom Ogilvy Harald Staff wrote in message ... Hi There are checkboxes and checkboxes. The ones from the Forms toolbar are part of its Checkboxes collection, so you can address #5 as Checkboxes(5). The ActiveX boxes from the Controls toolbar are not, you have to deal with them one by one. -- HTH. Best wishes Harald Followup to newsgroup only please. "Don Madsen" wrote in message ... If a sheet has CheckBox1 .....CheckBox20 and you want to program to hide certain ones based on some criteria. For example, making CheckBox5 to CheckBox9 Visible.False? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Data value display attributes linked to table attributes | Charts and Charting in Excel | |||
ActiveX Controls vs Form Controls | Excel Discussion (Misc queries) | |||
Setting character attributes in a text string | Excel Worksheet Functions | |||
Setting form controls focus and enter key | Excel Programming | |||
setting procedure attributes | Excel Programming |