quote:以下是引用城外之人在2008-04-03 11:35:26的发言:
Dim fs
Dim FolderName
Set fs = CreateObject("s cripting.FileSystemObject")
FolderName = "D:\Test"
If Not fs.FolderExists(FolderName) Then
fs.CreateFolder FolderName
End If
Set fs = Nothing
呵呵,谢谢城主的关注,自己已经解决:
Dim path,folderName,fso, f, fc, nf,msg
path="E:\"
folderName=inputbox("请输入文件夹名")
Set fso = CreateObject("s cripting.FileSystemObject")
Set f = fso.GetFolder(path)
Set fc=f.SubFolders
If fso.FolderExists(path&folderName) Then
msgbox "该文件已存在!"
Else
msg= MsgBox ("是否创建文件夹?", 4, "提示!")
If msg=6 Then
Set nf = fc.Add(folderName)
End If
End If
感觉还是没有城主编的简单哦!