-
How do I change a listview from
_________
A|XXX|FFF|
_|___|___|
A|YYY|FFF|
_|___|___|
A|ZZZ|GGG|
_|___|___|
to
_________
.|XXX|...|
.|___|...|
A|YYY|FFF|
.|___|___|
.|ZZZ|GGG|
_|___|___| where the .(dot) represents empty space.
PS: For those who can't figure out what I have drawn, please copy and paste the figure to a notepad. Then you will have a better view of what I have drawn.
TIA
-
Try something like this:
listview.ListItems(0).SubItems(1)="blabla"
-
kedaman,
Are you trying to say that add in advance to the subitems?? If that's what you mean, then it couldn't work.
Can you elaborate more...
thanks.
-
Hello,
This is what I think you're trying to do, just add a command button to your form and give it a go.
Code:
Option Explicit
Private Sub Command1_Click()
With ListView1.ListItems.Add()
.Text = "Col -1"
.SubItems(1) = "Col - 2"
.SubItems(2) = "Col - 3"
End With
End Sub
Private Sub Form_Load()
With ListView1
.View = lvwReport
With .ColumnHeaders
.Add 1, "Col-1", "Col-1"
.Add 2, "Col-2", "Col-2"
.Add 3, "Col-3", "Col-3"
End With
End With
End Sub
Hope it helps,
Desire.