不确定什么是你的 触发条件.
'-----------------------------------------------
Private Sub 全部显示_Click()
Dim Itm As ListItem, i As Integer, j%, aaarr() '如果提前给数组定义一个大尺寸, list的下面有空行
ListView1.ListItems.Clear
With Sheet1
For i = 2 To .Range("A65536").End(xlUp).Row
Set Itm = ListView1.ListItems.Add()
Itm.Text = .Cells(i, 1)
Itm.SubItems(1) = .Cells(i, 2)
Itm.SubItems(2) = .Cells(i, 3)
Itm.SubItems(3) = .Cells(i, 4)
Next
End With
ReDim aaarr(i - 3, 1 To 1)
For j = 0 To i - 3
aaarr(j, 1) = ListView1.ListItems(j + 1).SubItems(1)
Next j
ComboBox1.List = aaarr
End Sub |