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

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

  • BarkeeperBarkeeper Posts: 335Member
    Forgot the "HideSelection"-Property

    *grml*
    ------------------------------------------
    Only stupidity of mankind and the universe
    are infinite, but i'm not sure concerning
    the universe. A. Einstein
Sign In or Register to comment.