본문 바로가기
카테고리 없음

폴더열기

by 팁텍북 2024. 7. 8.

Sub OpenFolder()
    Dim folderPath As String
    folderPath = "C:\YourFolderPath" ' 여기에 열고자 하는 폴더 경로를 입력하세요.
    
    If Dir(folderPath, vbDirectory) <> "" Then
        Shell "explorer.exe " & folderPath, vbNormalFocus
    Else
        MsgBox "폴더를 찾을 수 없습니다: " & folderPath
    End If
End Sub

댓글