Recherche nom de fichier
Fermé
Ghizlane_9156
Messages postés
1
Date d'inscription
dimanche 29 mars 2020
Statut
Membre
Dernière intervention
29 mars 2020
-
29 mars 2020 à 06:50
yg_be Messages postés 22726 Date d'inscription lundi 9 juin 2008 Statut Contributeur Dernière intervention 26 avril 2024 - 29 mars 2020 à 10:19
yg_be Messages postés 22726 Date d'inscription lundi 9 juin 2008 Statut Contributeur Dernière intervention 26 avril 2024 - 29 mars 2020 à 10:19
A voir également:
- Recherche nom de fichier
- Fichier rar - Guide
- Fichier host - Guide
- Fichier iso - Guide
- Comment réduire la taille d'un fichier - Guide
- Ouvrir fichier .bin - Guide
1 réponse
yg_be
Messages postés
22726
Date d'inscription
lundi 9 juin 2008
Statut
Contributeur
Dernière intervention
26 avril 2024
1 476
29 mars 2020 à 10:19
29 mars 2020 à 10:19
bonjour, un exemple:
Option Explicit Private Sub chercherphotos() Dim dossier As String, colA As Range, onglet As Worksheet, ref As Range, ext As String Set onglet = ThisWorkbook.Sheets("photos") Set colA = Intersect(onglet.[A:A], onglet.UsedRange) dossier = ThisWorkbook.Path + "\" ext = ".png" For Each ref In colA If ref <> "" Then If Dir(dossier + ref + ext) <> "" Then ref.Offset(0, 7) = ref Else ref.Offset(0, 7) = "message error" End If End If Next ref End Sub