wrote :: 2006.01.17
Declare Function SHCreateDirectoryEx Lib "shell32" Alias "SHCreateDirectoryExA" ( _
ByVal hwnd As Long, _
ByVal pszPath As String, _
ByVal psa As Long) As Long
Sub Sample()
Dim rc As Long, Target As String
Target = InputBox("作成するフォルダのフルパスを入力してください")
If Target = "" Then Exit Sub
rc = SHCreateDirectoryEx(0&, Target, 0&)
If rc = 0 Then
MsgBox Target & "を作成しました"
ElseIf rc = 183 Then
MsgBox Target & "は存在しています"
Else
MsgBox Target & "を作成できませんでした"
End If
End Sub


