1. FAQ
  2. 엑셀(Excel)
  3. AfterEffects
  4. Premiere
  5. Photoshop
  6. ETC

이 게시판은 아별닷컴 회원만 질문을 올릴 수 있습니다. 회원에게 주어지는 특권인셈이지요. 회원이 아닌 분들은 열람만 가능합니다.

[레벨:30]아별

2019.06.05 21:55

오랫만에 다시 보는 코드 ㅎㅎ

겸사 겸사.. 특정 경로의 폴더를 순차적으로 만들어주는 코드를 정리해봤습니다.


Sub abMakeFolderPath()

    '### Created by abyul.com 2012.08.16

    Dim strPath As String: strPath = "C:\Secret\Hot\Cool\"

    If Right(strPath, 1) <> "\" Then strPath = strPath & "\"

    Dim i As Integer, intPosition As Integer: intPosition = 4

    For i = 1 To UBound(Split(strPath, "\")) - 1

        If Dir(Left(strPath, InStr(intPosition, strPath, "\")), vbDirectory) = Empty Then

            MkDir Left(strPath, InStr(intPosition, strPath, "\"))

        End If

        intPosition = InStr(intPosition, strPath, "\") + 1

    Next i

End Sub


문서 첨부 제한 : 0Byte/ 2.00MB
파일 제한 크기 : 2.00MB (허용 확장자 : *.*)