Embedded ListView

jstevens
GoldLounger
Posts: 2631
Joined: 26 Jan 2010, 16:31
Location: Southern California

Embedded ListView

Post by jstevens »

If I select an item from an "Embedded Listview" is there something similar to a change event?

I know how to use Listviews on a Userform and have been evaluating an "Embedded Listview" approach.

Something simple such as having a message box appear for the selected item of the Listview.
Regards,
John

User avatar
HansV
Administrator
Posts: 78556
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Embedded ListView

Post by HansV »

A ListView control has an ItemClick event that fires when you click on an item.
The event procedure goes into the worksheet module of the sheet on which the control is embedded.

Code: Select all

Private Sub ListView1_ItemClick(ByVal Item As MSComctlLib.ListItem)
    MsgBox "You clicked on " & Item.Text
End Sub
Best wishes,
Hans

jstevens
GoldLounger
Posts: 2631
Joined: 26 Jan 2010, 16:31
Location: Southern California

Re: Embedded ListView

Post by jstevens »

Thanks Hans!
Regards,
John