[vba] FolderCheck 함수를 이용한 폴더 생성 > vb6.0/vba

본문 바로가기

vb6.0/vba

[vb6.0vba] [vba] FolderCheck 함수를 이용한 폴더 생성

회원사진
하나를하더라도최선을
2021-08-09 14:06 2,721 0

본문



Public Function FolderCheck(fPath$) As String
    Dim Folders As Variant, Path$, i%
    Folders = Split(fPath, "\")
    Path = Folders(0)
    For i = 1 To UBound(Folders)
        If Len(Folders(i)) Then
            Path = Path + "\"
            Path = Path + Folders(i)
             If Len(Dir(Path + "\", vbDirectory)) = 0 Then MkDir Path
        End If
    Next
    FolderCheck = Path + "\"
End Function
 

댓글목록0

등록된 댓글이 없습니다.
게시판 전체검색