Bonjour à tous,
Ci-dessous j'ai copié une macro qui marche très bien pour créer des dossiers.
Seulement je souhaite avoir une macro qui copie un dossier type et enregistrer ce dossier autant de fois que j'ai de lignes dans ma colonne.
Pouvez-vous m'aider SVP ????
Sub creation_dossier()
Dim x As String, strPath As String
Range([A1], [A80].End(xlUp)).Select
For Each cell In Selection
Rep = cell.Value
On Error Resume Next
strPath = "C:\Documents and Settings\dcn\Mes documents\" & Rep
x = GetAttr(strPath) And 0
If Err <> 0 Then
MkDir strPath
End If
Next cell
On Error GoTo 0
End Sub
PS: Débutant
Ci-dessous j'ai copié une macro qui marche très bien pour créer des dossiers.
Seulement je souhaite avoir une macro qui copie un dossier type et enregistrer ce dossier autant de fois que j'ai de lignes dans ma colonne.
Pouvez-vous m'aider SVP ????
Sub creation_dossier()
Dim x As String, strPath As String
Range([A1], [A80].End(xlUp)).Select
For Each cell In Selection
Rep = cell.Value
On Error Resume Next
strPath = "C:\Documents and Settings\dcn\Mes documents\" & Rep
x = GetAttr(strPath) And 0
If Err <> 0 Then
MkDir strPath
End If
Next cell
On Error GoTo 0
End Sub
PS: Débutant