본문 바로가기
개발자 커뮤니티에 오신 것을 환영합니다!

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

페이지 정보

profile_image
작성자 하나를하더라도최선을
댓글 0건 조회 27,264회 작성일 21-08-09 14:06

본문

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
 

댓글목록

등록된 댓글이 없습니다.


Copyright © program1472 | IT HUB. All rights reserved.