Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

listbox multiselect property can it be changed? 1

Status
Not open for further replies.

BradMiller

Vendor
Dec 30, 2002
6
US
msgbox me.listbox26.multiselect' returns 1 (for "Simple")

i want to change this

so i try (and get error saying i can't change that property)

me.listbox26.multiselect = me.optiongroup3 '2 (for "Extended")

I'd like the user to be able to select which multiselect they prefer through an option group.

is this possible.
any suggestions.

i tried searching b4 asking but site is doing maintenance.

Thanks in advance.
 
Sory... the multiselect property of a listbox may only be changed while the form is in design view. It's not a property that can be changed on the fly!
 
Thanks MasterPO. I kind of figured I was limited in that aspect but nice to know for sure.

What I wanted to do was highly unecessary anyway, just wanted to show off =)

=( B. Miller
 
Of course u can handle it by code,

I never tried or used it, but its real trivial:
In the afterupdate of ur listbox set:
If kader = "extended" then
first = cboExtended.listindex
if itemsselected.count > 1 then
second = 'search for listindex next to or previous from the first index
end if
if first <> null and second <> null then
Call cboExtended(first, second)
end if

Function cboExtended(first as long, second as long)
for each item between first and second
item.selected = false
next item
end Function

Very wrong code, but i don't have time to work it out now,
it's possible, if u need it and u cant'handle it by urself, u can come back and I give it a try for u,

Gerard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top