Private Sub Command1_Click() '将文本框中的信息添加到列表框中 Dim i As Integer With ListView1.ListItems.Add() .Text = Text1(0) For i = 1 To 4 .SubItems(i) = Text1(i) Next i End With End Sub
Private Sub Command1_Click() Dim li As ListItem Dim i As Integer Set li = ListView1.ListItems.Add(, , Text1(0).Text) For i = 1 To 4 li.ListSubItems.Add , , Text1(i).Text Next End Sub