- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-4-2 10:29 ½s¿è
¦^´_ 2# yangjie - Set fd = Application.FileDialog(msoFileDialogFolderPicker)
- With fd
- .AllowMultiSelect = True '
- 'AllowMultiSelect ÄÝ©Ê True ¦pªG¤¹³\¨Ï¥ÎªÌ±qÀÉ®×¹ï¸Ü¤è¶ô¿ï¨ú¦hÓÀɮסCŪ/¼g Boolean
- '¦ýAllowMultiSelect Äݩʹï msoFileDialogFolderPicker ¤£°_§@¥Î
½Æ»s¥N½X ¥i¥Îªí³æ- Option 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
½Æ»s¥N½X |
|