| ©«¤l5923 ¥DÃD13 ºëµØ1 ¿n¤À5986 ÂI¦W0  §@·~¨t²Îwin10 ³nÅ骩¥»Office 2010 ¾\ŪÅv150 ©Ê§O¨k ¨Ó¦Û¥xÆW°ò¶© µù¥U®É¶¡2010-5-1 ³Ì«áµn¿ý2022-1-23 
         
 | 
                
| ¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-4-2 10:29 ½s¿è 
 ¦^´_ 2# yangjie
 ¥i¥Îªí³æ½Æ»s¥N½XSet fd = Application.FileDialog(msoFileDialogFolderPicker)
    With fd
     .AllowMultiSelect = True '
     'AllowMultiSelect ÄÝ©Ê True ¦pªG¤¹³\¨Ï¥ÎªÌ±qÀÉ®×¹ï¸Ü¤è¶ô¿ï¨ú¦hÓÀɮסCŪ/¼g Boolean
    '¦ýAllowMultiSelect Äݩʹï msoFileDialogFolderPicker ¤£°_§@¥Î
½Æ»s¥N½XOption Explicit
Private Sub UserForm_Initialize()
    Ex
    With ListBox1  '½Ð¥ý¦bªí³æ¤¤¥[¤J³o±±¨î¶µ
        .Font.Size = 12
        .Top = 10
        .Height = .ListCount * .Font.Size
         DoEvents
        .Left = 10
        .Width = 300
        .MultiSelect = fmMultiSelectMulti  '±µ¨ü¦h«¿ï¨ú
        Width = .Width + 20
        Height = .Height + 40
    End With
End Sub
Private Sub ListBox1_Change()
    Dim s As String, i As Integer
    With ListBox1
        For i = 0 To .ListCount - 1
            If .Selected(i) = True Then s = s & .List(i) & vbLf
        Next
        If s <> "" Then MsgBox s
    End With
End Sub
Private Sub Ex()
    Dim f As Object, e
    Set f = CreateObject("Scripting.FileSystemObject").getfolder(CurDir).SubFolders
    For Each e In f
        ListBox1.AddItem e
    Next
End Sub
 | 
 |