Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there,
I have a listbox control on my sheet Its ListStyle = 1 - fmListStyleOption and it has got 5 items in it as flllows: All Red Green Blue Orange When i select 'All' (the first item) it should select all the items in the list box. Can anyone suggest anything on this please? Thanking in advance. Vipul Agheda |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Change the property Multiselect
from fmMultoSelectSingle to fmMultiSelectMulti "Vipul" wrote: Hi there, I have a listbox control on my sheet Its ListStyle = 1 - fmListStyleOption and it has got 5 items in it as flllows: All Red Green Blue Orange When i select 'All' (the first item) it should select all the items in the list box. Can anyone suggest anything on this please? Thanking in advance. Vipul Agheda |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks for replying Joel
MultiSelect property is already fmMultiSelectMulti i want all the items to be selected automatically when i select only the first one. i want to know how can i do it. can u help with this? thanks buddy Vipul "Joel" wrote: Change the property Multiselect from fmMultoSelectSingle to fmMultiSelectMulti "Vipul" wrote: Hi there, I have a listbox control on my sheet Its ListStyle = 1 - fmListStyleOption and it has got 5 items in it as flllows: All Red Green Blue Orange When i select 'All' (the first item) it should select all the items in the list box. Can anyone suggest anything on this please? Thanking in advance. Vipul Agheda |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Paste this code into the sheets code module. '------------------------ Private m_blnUpdating As Boolean Private Sub ListBox1_Change() Dim lngIndex As Long If m_blnUpdating Then Exit Sub If ListBox1.ListIndex = 0 Then If ListBox1.Selected(0) Then m_blnUpdating = True For lngIndex = 1 To ListBox1.ListCount - 1 ListBox1.Selected(lngIndex) = True Next m_blnUpdating = False End If End If End Sub '------------------------ Cheers Andy -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info "Vipul" wrote in message ... Hi there, I have a listbox control on my sheet Its ListStyle = 1 - fmListStyleOption and it has got 5 items in it as flllows: All Red Green Blue Orange When i select 'All' (the first item) it should select all the items in the list box. Can anyone suggest anything on this please? Thanking in advance. Vipul Agheda |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What is the purpose? Is it for the user to see all the cells selected? A
macro can read all the cells in the box so I'm not sure what your intentions are. Also how is yu code going to work. Are you going to use a ONClick routine or is your code going to operate when the user presses a control button? "Vipul" wrote: thanks for replying Joel MultiSelect property is already fmMultiSelectMulti i want all the items to be selected automatically when i select only the first one. i want to know how can i do it. can u help with this? thanks buddy Vipul "Joel" wrote: Change the property Multiselect from fmMultoSelectSingle to fmMultiSelectMulti "Vipul" wrote: Hi there, I have a listbox control on my sheet Its ListStyle = 1 - fmListStyleOption and it has got 5 items in it as flllows: All Red Green Blue Orange When i select 'All' (the first item) it should select all the items in the list box. Can anyone suggest anything on this please? Thanking in advance. Vipul Agheda |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I select multi values from a list | Excel Discussion (Misc queries) | |||
What function to select the last 3 small values from a list ? | Excel Discussion (Misc queries) | |||
What function to select the last 3 small values from a list ? | Excel Worksheet Functions | |||
Auto Select from list of values | Excel Programming | |||
Select values from list | Excel Discussion (Misc queries) |