Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiselect Listbox use RKS Excel Discussion (Misc queries) 1 May 12th 06 03:04 PM
MultiSelect ListBox StephanieH Excel Programming 5 November 20th 04 12:29 AM
Multiselect Listbox Francis Ang[_3_] Excel Programming 0 October 27th 04 02:21 AM
Multiselect Listbox Francis Ang[_3_] Excel Programming 2 October 25th 04 01:57 AM
multiselect listbox CG Rosén Excel Programming 2 December 28th 03 05:17 PM


All times are GMT +1. The time now is 05:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"