Sì, però prima di dare il comando di creazione della cartella si deve controllare se esiste già, potresti fare in questo modo:
codice:
Private Sub Command1_Click()
Dim strNameFold As String
Dim FSO As FileSystemObject
Set FSO = New FileSystemObject
'Controlla se esiste la cartella DATI altrimenti la crea:
If (FSO.FolderExists(App.Path & "\" & "DATI")) = False Then
With FSO
.CreateFolder (App.Path & "\" & "DATI")
.CreateFolder (App.Path & "\" & "DATI\AnagClienti")
' ... ... ...
End With
strNameFold = FSO.GetFolder(App.Path & "\" & "DATI")
MsgBox "La cartella DATI e le relative sottocartelle, sono state" & vbCr _
& "create con successo in " & strNameFold & ".", vbInformation, "Applicazioni........"
End If
Set FSO = Nothing
End Sub