A voir également:
- Excel écriture nom fichiers
- Liste déroulante excel - Guide
- Annuaire portable gratuit a partir d'un nom ✓ - Forum Mobile
- Formule excel - Guide
- Nom de l'adresse ✓ - Forum Internet / Réseaux sociaux
- Écriture facebook - Guide
2 réponses
Bonjour,
Voici un exemple que j'ai tiré de la toile :
Cdt
Lupin
Voici un exemple que j'ai tiré de la toile :
Sub ChercheFichier()
Dim myStr As String, myN As String, i As Long
Worksheets.Add
With Application.FileSearch
.LookIn = ("C:\Document\Excel")
If .Execute() > 0 Then
For i = 1 To .FoundFiles.Count
myStr = .FoundFiles(i)
Cells(i, 1) = .LookIn & "\"
myN = Right(myStr, Len(myStr) - Len(Cells(i, 1)))
Cells(i, 2) = Left(myN, Len(myN) - 4)
Cells(i, 3) = Right(myStr, 3)
Next i
Else
MsgBox "Aucun fichier"
End If
End With
[a:c].EntireColumn.AutoFit
End Sub
'
Cdt
Lupin