7,763
社区成员
发帖
与我相关
我的任务
分享
Option Explicit
Private Sub Command1_Click()
Dim i As Long, strPath As String
strPath = Dir1.Path & "\新建文件夹"
i = 1
If Dir(strPath, vbDirectory) > "" Then '2
Do Until Dir(strPath & i, vbDirectory) = ""
i = i + 1
Loop
MkDir strPath & i
Else
MkDir strPath
End If
Dir1.Refresh '1
End Sub
Option Explicit
Private Sub Command1_Click()
Dim i As Long, strPath As String
strPath = Dir1.Path & "\新建文件夹"
i = 1
If Dir(strPath, vbDirectory) > "" Then '2
Do Until Dir(strPath & i, vbDirectory) = ""
i = i + 1
Loop
End If
MkDir strPath & i
Dir1.Refresh '1
End Sub