티스토리 뷰

엑셀

엑셀 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







.




반응형

'엑셀' 카테고리의 다른 글

엑셀 vba 프린터 설정  (0) 2018.11.29
엑셀 vba GetDesktop_Folder  (0) 2018.11.29
엑셀 vba Create_Folder  (0) 2018.11.28
엑셀 vba 시트_선택_없으면_만들기  (0) 2018.11.28
엑셀 vba 사진삭제  (0) 2018.11.28
댓글