Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Multiselect listbox with check boxes
The code below creates a multiselectable listbox with check boxes linked to a
named range. The code creates the box. However, you cannot select the box or any of the checkboxes. There are two ways around this problem. Either turn on and off design mode OR select another worksheet then select the worksheet with the listbox. Is this a bug or did I leave something out? This does not seem like normal behavior. It almost seems as if the items are locked or disabled. I am using Office 2003 and tried different computers to make sure is was not a software issue. Sub test() lbdoawidth = 100 lbdoaover = 250 lbdoafromtop = 75 lbdoaheight = 75 lbdoadropdownlns = 7 x = 1 incremental = 100 ' create listbox and populate with named range. Check boxes and multi select enabled Sheets("sheet3").OLEObjects.Add(ClassType:="Forms. ListBox.1", Link:=False, _ DisplayAsIcon:=False, Left:=lbdoaover, Top:=(lbdoafromtop + incremental), Width:=lbdoawidth, Height:= _ lbdoaheight).Select selectionname = "lbdoa" & x With Selection .Name = "lbdoa" & x .ListFillRange = "expdoa" End With 'ActiveSheet.OLEObjects(selectionname).Object.Mult iSelect = fmMultiSelectMulti ActiveSheet.OLEObjects(selectionname).Object.Multi Select = 1 ActiveSheet.OLEObjects(selectionname).Object.ListS tyle = fmListStyleOption ActiveSheet.OLEObjects(selectionname).Object.Bound Column = 1 ActiveSheet.OLEObjects(selectionname).Object.Colum nCount = 1 ActiveSheet.OLEObjects(selectionname).Object.Enabl ed = True End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Multiselect Listbox use | Excel Discussion (Misc queries) | |||
MultiSelect ListBox | Excel Programming | |||
Multiselect Listbox | Excel Programming | |||
Multiselect Listbox | Excel Programming | |||
multiselect listbox | Excel Programming |