Dim pathname As String, tripid As String, respCreate
Sub ChecknCreateDirectory()
tripid = "12"
pathname = "C:\Users\" & Environ("username") & "\Google Drive\" & tripid
If (Len(Dir(pathname, vbDirectory)) = 0) Then
rspCreate = MsgBox("Directory doesn't exist, do you wish to create it?", vbYesNo)
If (rspCreate = vbYes) Then
MkDir "C:\Users\" & Environ("username") & "\Google Drive\" & tripid
End If
End If
End Sub
Sub ChecknCreateDirectory()
tripid = "12"
pathname = "C:\Users\" & Environ("username") & "\Google Drive\" & tripid
If (Len(Dir(pathname, vbDirectory)) = 0) Then
rspCreate = MsgBox("Directory doesn't exist, do you wish to create it?", vbYesNo)
If (rspCreate = vbYes) Then
MkDir "C:\Users\" & Environ("username") & "\Google Drive\" & tripid
End If
End If
End Sub
No comments:
Post a Comment