Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tim,
Creating checkboxes dynamically is easy enough as this code shows With Me .Controls.Add ("forms.Checkbox.1") With .Controls("Checkbox1") .Caption = "Hello" .Name = "chkHello" .Top = 12 End With .Controls.Add ("forms.Checkbox.1") With .Controls("Checkbox1") .Caption = "Goodbye" .Name = "chkGoodbye" .Top = 24 End With End With You may have to set a lot more properties though to get it exactly as you want. However, there is another issue you need to manage, and that is there is no event code to handle the checkbox status, so you will need to add this as well. Take a look at Chip's site to get some ideas on adding code dynamically http://www.cpearson.com/excel/vbe.htm -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Tim Marsh" wrote in message ... Hi, I would like to create a form containing checkboxes 'on-the-fly' from a list of values in a spreadsheet range, so after "userform_initialise()" i want something like "do until the last cell in the range =""" "me.controls.add...... a checkbox named after the value of the active cell" "activecell.offset(1,0)" "loop" the bit i can't do is create the checkbox control on the userform (i guess i'd also liketo control whereabouts on the form the controls go as they are added). greatly for any help, Tim |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating multi-user Excel form for online | Excel Discussion (Misc queries) | |||
Creating a user interface form | Excel Discussion (Misc queries) | |||
Clear a Checkbox in a a user form | Excel Discussion (Misc queries) | |||
how to delete or remove checkbox form control in Excel? | Excel Discussion (Misc queries) | |||
Creating a list box in a user form | Excel Programming |