- ©«¤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
        
|
¦^´_ 1# ¤Ú§J´µ
קï¤@¤U VBA: Dir ¨ç¼Æ½d¨Ò ¸Õ¸Õ¬Ý- Option Explicit
- Sub Ex()
- Dim MyPath As String, MyName As String, xi As Integer
- MyPath = "C:\TEST\" ' «ü©w¸ô®|¡C
- MyName = Dir(MyPath, vbDirectory) ' §ä´M²Ä¤@Ó¤l¥Ø¿ý¡C
- Do While MyName <> "" ' °õ¦æ°j°é¡C
- If MyName <> "." And MyName <> ".." Then
- If GetAttr(MyPath & MyName) = vbDirectory And MyName Like "a0001*" Then
- xi = xi + 1
- Cells(xi, "A") = MyName
- End If
- End If
- MyName = Dir ' ´M§ä¤U¤@ӥؿý¡C
- Loop
- End Sub
½Æ»s¥N½X |
|