엑셀
엑셀 vba Desktop_Folder_Make
아스C#
2018. 11. 29. 00:00
반응형
Function Desktop_Folder_Make(str As String, Optional autoDate As Boolean = False)
Set WshShell = CreateObject("WScript.Shell")
deskpath = WshShell.SpecialFolders("Desktop") + "\"
If autoDate = True Then
Path = str & Format(Now, "-yyyymmdd-hhmmss")
Else
Path = str
End If
filePath = deskpath + Path + "\"
If Dir(filePath, vbDirectory) = "" Then
MkDir (filePath)
End If
Desktop_Folder_Make = filePath
End Function
.
반응형