- ©«¤l
- 12
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 50
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows
- ³nÅ骩¥»
- Xp
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2017-12-26
- ³Ì«áµn¿ý
- 2019-5-21
|
¦^´_ 3# prin.huang
Sub P_Sample004()
Dim myFileName As String
myFileName = Application.InputBox(Prompt:= _
"½Ð¿é¤JÀɮצWºÙ¡B¸ê®Æ§¨¦WºÙªº§¹¾ã¸ô®|", Title:="½T»{¦s¦b")
If Len(Dir(myFileName, vbDirectory)) > 0 Then
If (GetAttr(myFileName) And vbDirectory) = vbDirectory Then
MsgBox "©Ò«ü©w¤§¸ê®Æ§¨¦s¦b¡C"
Else
MsgBox "©Ò«ü©w¤§Àɮצs¦b¡C"
End If
Else
MsgBox "©Ò«ü©w¤§ÀɮשάO¥Ø¿ý¤£¦s¦b¡C"
End If
End Sub
Sub P_Sample003()
Dim myPath As String
Dim myFileName As String
Dim i As Long
myPath = ThisWorkbook.Path & "\" '¥ô·Nªº¸ê®Æ§¨
myFileName = Dir(myPath, 0)
Do While Len(myFileName) > 0
Debug.Print myPath & myFileName
myFileName = Dir()
Loop
End Sub |
|