I want certain data on a large List Box to stand out by highlighting the row or highlighting a specific text. How should I go about doing this? Any related info out there I can look at?
Thank you.
I do not think that there is a way to do this with a listbox. Build a subform that works and looks like a listbox. A little formatting can do this. Use on click events to change the value of a field when you click on a row. Now to highlight the current row, this is my approach
Code:
Dim varCurrentID As Long
Private Sub Form_Current()
varCurrentID = Me.ID
Me.Recalc
End Sub
Public Function CurrentID() As Variant
CurrentID = (varCurrentID)
End Function
Private Sub Form_Load()
varCurrentID = Me.ID
End Sub
I use an unbound control "txtBoxCurrentID" on the form and set its value to
=CurrentID()
Then I use conditional formatting to highlight text boxes where [txtBoxCurrentID] = [ID]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.