Solved

Listbox

Posted on 1998-08-15
1
151 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
mwam earned 10 total points
ID: 1429095
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month9 days, 7 hours left to enroll

624 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