How I can clear the highlighted color in the listview?
It highligted the row in the listview during form load. How to clear this?
Printable View
How I can clear the highlighted color in the listview?
It highligted the row in the listview during form load. How to clear this?
Hi matril02
Try this line. If there are any records, it makes sure that nothing is highlighted. If no records, no error as you have taken that into account.
Code:If Listview1.ListItems.Count > 0 Then Listview1.SelectedItem.Selected = False
Or perhaps this code might help
ListView.ListIndex=-1
it cannot happen automatically. Try checking the property page of listview. Simply try addingQuote:
It highligted the row in the listview during form load
just before End sub of Form loadCode:Me.ListView1.Refresh