Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tim,
Something like this in your form code should do it. I haven't tested it in this form but I have something similar running in other routines. Dim cTemp as Control Dim shInput as Worksheet Dim lRowCounter as Long 'Start your loop, no need to select the cells Set shInput = thisworkbook.sheets("InputSheetNameHere") lRowCounter = 1 Do While not isempty(shInput.cells(lRowCounter,1).value) Set cTemp = Me.Controls.Add("Forms.CheckBox.1") with cTemp .top = 'your top pos .visible = true .left = 'your left pos .width = 'your width .name = shInput.cells(lrowcounter,1).value .caption = 'your caption , e.g. shInput.Cells(lrowcounter,2).value end with lrowcounter = lrowcounter +1 loop Robin Hammond www.enhanceddatasystems.com "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 |