Solved

Listbox

Posted on 1998-08-15
1
143 Views
Last Modified: 2010-04-30
Do you Know How to make it so there are like 2 list boxes and when you click on a Item in list1 it shows only there Msgs in list2
0
Comment
Question by:Scorpion2000
1 Comment
 

Accepted Solution

by:
mwam earned 10 total points
Comment Utility
there may be better ways to do this but it works:
'---------start code-------------
Private Sub Form_Load()
List1.AddItem "this string"
List1.AddItem "that string"
List1.AddItem "this and that string"

End Sub

Private Sub List1_Click()
List2.Clear

For i = 0 To List1.ListCount - 1
If List1.Selected(i) = True Then List2.AddItem List1.List(i)

Next
End Sub
'------------------end code-----------------
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now