Get items in ListView in columns
Let me be a bit more specific.
This is the relevant code bits to do with the ListView:
With ListView1
.HideColumnHeaders = False
.HideSelection = False
.LabelEdit = lvwManual
.Sorted = False
.TextBackground = lvwOpaque
.FullRowSelect = True
.View = lvwReport
End With
With ListView1
.ListItems.Add i, , hwnd
.ListItems(i).ListSubItems.Add , , sClassname
.ListItems(i).ListSubItems.Add , , sWindowText
End With
On testing (msgbox, ListView1.ListItems.Count) all seems to be working fine,
but nothing shows in the ListView.
I can't even get column header to show, although the grey column shows on
the top.
I am talking here about the Microsoft ListView Control 6.0 (SP6) in VBA.
I am just puzzeled by this and would greatly appreciate any advice.
RBS
"RB Smissaert" wrote in message
...
Using Excel XP.
Does anybody have a simple example of how to get items (short strings) in
a
ListView control in columns?
It has to be added in a loop like this:
Add item in column 1
Add item in column 2
Add item in column 3
Add item in column 1
etc.
Seems a simple thing, but I can't get it to work.
Thanks for any assistance.
RBS
|