Solved

How to lock a list box...

Posted on 2004-07-31
3
185 Views
Last Modified: 2012-05-05
I have a list box on a VB form.  I don't want to disable it (because I want its content to stay dark and readable).  Also, don't like it to be selectable (now, when I click on a item on this list box, it gets selected and that item gets high-lighted).

Following doesn't work?

Sub lstBox_MouseUp(....)
   lstBox.Selected = False
End Sub
----------
I also made txtDummy, and
Sub lstBox_Click()
   txtDummy.SetFocus
End Sub

Sub txtDummy_GotFocus()
   lstBox.Selected = False
End Sub

Any Idea?
0
Comment
Question by:Mike Eghtebas
  • 2
3 Comments
 
LVL 67

Accepted Solution

by:
sirbounty earned 250 total points
ID: 11686732
Try:

Private Sub List1_Click()
List1.ListIndex = -1
End Sub
0
 
LVL 33

Author Comment

by:Mike Eghtebas
ID: 11686747
Thank you Sir.

Mike
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 11686751
Happy to help. : )
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

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…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

776 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