lionne
04-26-2013, 12:23 AM
hi
Is there a way to display a short message, when pointing with a mouse on a particular item (or even better on header) of a column in a ListView Control? I am using a Form Activate event, where I populate the ListView Control:
Private Sub UserForm_Activate()
Dim wb As Workbook
Dim lc As Worksheet
Dim Row As Integer
Set wb = Excel.ActiveWorkbook
Set lc = wb.Sheets("LogCase")
Dim li As ListItem
Dim liSI As ListSubItem
'populate the list view
With Review_Logical.lsv_tclist
.ColumnHeaders.Add , , "ID"
.ColumnHeaders(1).Width = 25
.ColumnHeaders.Add , , "Test Case Name"
.ColumnHeaders(2).Width = 200
.ColumnHeaders.Add , , "New Parlist Field(s)"
.ColumnHeaders(3).Width = 80
.FullRowSelect = True
.LabelEdit = lvwManual
.CheckBoxes = False
.HideColumnHeaders = False
.View = 3
.Gridlines = True
.MultiSelect = True
For Row = 2 To tc_num 'tc_num is integer, its value is omitted here
Set li = .ListItems.Add(, , lc.Cells(Row, 1).Value)
li.SubItems(1) = lc.Cells(Row, 2).Value
'...
Next
End With
End Sub
Is there a way to display a short message, when pointing with a mouse on a particular item (or even better on header) of a column in a ListView Control? I am using a Form Activate event, where I populate the ListView Control:
Private Sub UserForm_Activate()
Dim wb As Workbook
Dim lc As Worksheet
Dim Row As Integer
Set wb = Excel.ActiveWorkbook
Set lc = wb.Sheets("LogCase")
Dim li As ListItem
Dim liSI As ListSubItem
'populate the list view
With Review_Logical.lsv_tclist
.ColumnHeaders.Add , , "ID"
.ColumnHeaders(1).Width = 25
.ColumnHeaders.Add , , "Test Case Name"
.ColumnHeaders(2).Width = 200
.ColumnHeaders.Add , , "New Parlist Field(s)"
.ColumnHeaders(3).Width = 80
.FullRowSelect = True
.LabelEdit = lvwManual
.CheckBoxes = False
.HideColumnHeaders = False
.View = 3
.Gridlines = True
.MultiSelect = True
For Row = 2 To tc_num 'tc_num is integer, its value is omitted here
Set li = .ListItems.Add(, , lc.Cells(Row, 1).Value)
li.SubItems(1) = lc.Cells(Row, 2).Value
'...
Next
End With
End Sub