2,463
社区成员
发帖
与我相关
我的任务
分享
Private Sub UserForm_Initialize()
Dim strTmp As String
Me.ListBox1.ListStyle = fmListStyleOption
Me.ListBox1.MultiSelect = fmMultiSelectMulti
strTmp = Dir("C:\Windows\")
Do While strTmp <> ""
ListBox1.AddItem strTmp
strTmp = Dir
Loop
End Sub
Private Sub UserForm_Click()
Dim i As Integer
For i = 0 To Me.ListBox1.ListCount - 1
If ListBox1.Selected(i) Then Debug.Print ListBox1.List(i)
Next
End Sub