Private Sub 全选_Click()
Me.列表框.SetFocus
Me.列表框.Selected(Me.列表框.ListCount-1)=True
DoEvents
SendKeys "^+{HOME}", True
Me.全选.SetFocus
End Sub
Private Sub 取消全选_Click()
Dim 列表项变量 As Variant
Me.列表框.SetFocus
SendKeys "{DOWN}", True
Me.取消全选.SetFocus
For Each 列表项变量 In Me.列表框.ItemsSelected
Me.列表框.Selected(列表项变量).Selected=False
Next
End Sub
Me.列表框.SetFocus
Me.列表框.Selected(Me.列表框.ListCount-1)=True
DoEvents
SendKeys "^+{HOME}", True
Me.全选.SetFocus
End Sub
Private Sub 取消全选_Click()
Dim 列表项变量 As Variant
Me.列表框.SetFocus
SendKeys "{DOWN}", True
Me.取消全选.SetFocus
For Each 列表项变量 In Me.列表框.ItemsSelected
Me.列表框.Selected(列表项变量).Selected=False
Next
End Sub