Dim fso As FileSystemObject
Set fso = New FileSystemObject
With fso
If txtGruppo10.Text = "" Then
Label22.Caption = "Group10 not create"
Else
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & "\" & TxtName.Text & "\" & txtGruppo10.Text)
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & "\" & TxtName.Text & "\" & txtGruppo10.Text & "1")
'************************************************* **************************
If txtSotto1.Text = "" Then
Label22.Caption = "..."
Else
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtGruppo10.Text & "\" & txtSotto1.Text)
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtSotto1.Text & "1")
If txtUltimo1.Text = "" Then
Label22.Caption = "..."
Else
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtGruppo10.Text & "\" & txtSotto1.Text & "\" & txtUltimo1.Text)
End If
If txtUltimo2.Text = "" Then
Label22.Caption = "..."
Else
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtGruppo10.Text & "\" & txtSotto1.Text & "\" & txtUltimo2.Text)
End If
If txtUltimo3.Text = "" Then
Label22.Caption = "..."
Else
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtGruppo10.Text & "\" & txtSotto1.Text & "\" & txtUltimo3.Text)
End If
End If
'************************************************* **************************
If txtSotto2.Text = "" Then
Label22.Caption = "..."
Else
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtGruppo10.Text & "\" & txtSotto2.Text)
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtSotto2.Text & "1")
If txtUltimo1.Text = "" Then
Label22.Caption = "..."
Else
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtGruppo10.Text & "\" & txtSotto2.Text & "\" & txtUltimo1.Text)
End If
If txtUltimo2.Text = "" Then
Label22.Caption = "..."
Else
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtGruppo10.Text & "\" & txtSotto2.Text & "\" & txtUltimo2.Text)
End If
If txtUltimo3.Text = "" Then
Label22.Caption = "..."
Else
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtGruppo10.Text & "\" & txtSotto2.Text & "\" & txtUltimo3.Text)
End If
End If
'************************************************* **************************
If txtSotto3.Text = "" Then
Label22.Caption = "..."
Else
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtGruppo10.Text & "\" & txtSotto3.Text)
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtSotto3.Text & "1")
If txtUltimo1.Text = "" Then
Label22.Caption = "..."
Else
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtGruppo10.Text & "\" & txtSotto3.Text & "\" & txtUltimo1.Text)
End If
If txtUltimo2.Text = "" Then
Label22.Caption = "..."
Else
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtGruppo10.Text & "\" & txtSotto3.Text & "\" & txtUltimo2.Text)
End If
If txtUltimo3.Text = "" Then
Label22.Caption = "..."
Else
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtGruppo10.Text & "\" & txtSotto3.Text & "\" & txtUltimo3.Text)
End If
End If
'************************************************* **************************
If txtSotto4.Text = "" Then
Label22.Caption = "..."
Else
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtGruppo10.Text & "\" & txtSotto4.Text)
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtSotto4.Text & "1")
If txtUltimo1.Text = "" Then
Label22.Caption = "..."
Else
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtGruppo10.Text & "\" & txtSotto4.Text & "\" & txtUltimo1.Text)
End If
If txtUltimo2.Text = "" Then
Label22.Caption = "..."
Else
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtGruppo10.Text & "\" & txtSotto4.Text & "\" & txtUltimo2.Text)
End If
If txtUltimo3.Text = "" Then
Label22.Caption = "..."
Else
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtGruppo10.Text & "\" & txtSotto4.Text & "\" & txtUltimo3.Text)
End If
End If
'************************************************* **************************
If txtSotto5.Text = "" Then
Label22.Caption = "..."
Else
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtGruppo10.Text & "\" & txtSotto5.Text)
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtSotto5.Text & "1")
If txtUltimo1.Text = "" Then
Label22.Caption = "..."
Else
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtGruppo10.Text & "\" & txtSotto5.Text & "\" & txtUltimo1.Text)
End If
If txtUltimo2.Text = "" Then
Label22.Caption = "..."
Else
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtGruppo10.Text & "\" & txtSotto5.Text & "\" & txtUltimo2.Text)
End If
If txtUltimo3.Text = "" Then
Label22.Caption = "..."
Else
.CreateFolder (App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\" & txtGruppo10.Text & "\" & txtSotto5.Text & "\" & txtUltimo3.Text)
End If
End If
End With
Set fso = Nothing