ListView is not a built in function of VBA. You would have to construct the
list in Excel and then develop the controls and code for a user to display it
by clicking a button or using a keyboard command key.
Hello Avi,
Here is a sample of List View I used in VBA. My UserForm had a
ListView and 3 TextBoxes. This is taken from the Click event...
Private Sub ListView1_ItemClick(ByVal item As MSComctlLib.ListItem)
Dim RowNumber
RowNumber = item.Index
With ListView1.ListItems(RowNumber)
TextBox1.Text = .Text
TextBox2.Text = .SubItems(1)
TextBox3.Text = .SubItems(2)
.EnsureVisible
End With
End Sub
The Text property returns the item in the first column. Each
additional column is designated by the SubItems property. To JLGWhiz -
the ListView control can be added by going to "Additional Controls..."
under Tools menu in the VBIDE. You must have a UserForm in your
project selected and the control toolbox visible to access these
controls.
Sincerely,
Leith Ross