Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default ListBox question

I am using a Forms toolbar List Box. Based on the value selected in the list
box I would like to see certain filtered items in another list box.
For instance €“ ListBox1 €“ has items €“ A, B, C, so on.
If I select B in ListBox1 then in ListBox2 only items starting with B should
show up.

Is it possible?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default ListBox question

Hi,

On the ListBox1_Change event you call a sub "RefreshListBox2", so that the
selection of ListBox1 can take effect. Something like this.

Private Sub ListBox1_Change()
RefreshListBox2
End Sub

Private Sub RefreshListBox2()
Me.ListBox2.Clear
'write the code to put in the filtred data
'remember you have to take care of all
'ListBox1 posibilities here..
End Sub


Hopes it helps
Flemming



"LearningExcel" wrote in message
...
I am using a Forms toolbar List Box. Based on the value selected in the
list
box I would like to see certain filtered items in another list box.
For instance - ListBox1 - has items - A, B, C, so on.
If I select B in ListBox1 then in ListBox2 only items starting with B
should
show up.

Is it possible?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default ListBox question

Thank you.
Is it possible to achieve this without writing VBA code?

"Flemming Dahl" wrote:

Hi,

On the ListBox1_Change event you call a sub "RefreshListBox2", so that the
selection of ListBox1 can take effect. Something like this.

Private Sub ListBox1_Change()
RefreshListBox2
End Sub

Private Sub RefreshListBox2()
Me.ListBox2.Clear
'write the code to put in the filtred data
'remember you have to take care of all
'ListBox1 posibilities here..
End Sub


Hopes it helps
Flemming



"LearningExcel" wrote in message
...
I am using a Forms toolbar List Box. Based on the value selected in the
list
box I would like to see certain filtered items in another list box.
For instance - ListBox1 - has items - A, B, C, so on.
If I select B in ListBox1 then in ListBox2 only items starting with B
should
show up.

Is it possible?





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
Listbox Question Greg B Excel Discussion (Misc queries) 1 March 9th 05 02:17 PM
Listbox Question Greg B[_4_] Excel Programming 1 March 9th 05 02:17 PM
Listbox Question Greg B Excel Discussion (Misc queries) 0 March 9th 05 12:46 AM
Listbox Question Greg B Excel Worksheet Functions 0 March 9th 05 12:46 AM
ListBox Question RK[_2_] Excel Programming 9 May 23rd 04 10:36 PM


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

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

About Us

"It's about Microsoft Excel"