Getting an Item in a ListView-Box highlighted - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Getting an Item in a ListView-Box highlighted

BarkeeperBarkeeper Posts: 335Member
Hi there,

Excel-Sheet with an UserForm
ListView-Box in Report-Style with 4 Columns on the UserForm

CommandButton which offers a Search-Function

The Code for searching the item is easy, and it finds the Item in my ListView, so my next step would be

[code]
lstMain.ListItems(i).Selected=True
[/code]

with the Index "i" being the position in the List.
My Debug-Window says that the selection of the Item is True, but it doesn't highlight it in the List.

For example: Would i use an ordinary Listbox, i would use
ListBox.Listindex=i
and my item would be highlighted automatically.

How do i achieve the same with a ListView?

thx for any answers.
Zvoni
------------------------------------------
Only stupidity of mankind and the universe
are infinite, but i'm not sure concerning
the universe. A. Einstein

Comments

Sign In or Register to comment.