Inserer photo d'un fichier dans cellule Excel
Fermé
lise9365
-
7 déc. 2009 à 14:48
tompols Messages postés 1273 Date d'inscription jeudi 29 juillet 2004 Statut Contributeur Dernière intervention 25 novembre 2013 - 7 déc. 2009 à 15:53
tompols Messages postés 1273 Date d'inscription jeudi 29 juillet 2004 Statut Contributeur Dernière intervention 25 novembre 2013 - 7 déc. 2009 à 15:53
A voir également:
- Inserer photo d'un fichier dans cellule Excel
- Fichier rar - Guide
- Insérer liste déroulante excel - Guide
- Aller à la ligne dans une cellule excel - Guide
- Fichier host - Guide
- Fichier iso - Guide
1 réponse
tompols
Messages postés
1273
Date d'inscription
jeudi 29 juillet 2004
Statut
Contributeur
Dernière intervention
25 novembre 2013
435
7 déc. 2009 à 15:53
7 déc. 2009 à 15:53
Bonjour,
Voici un bot de code à adapter :
Sub images()
Application.ScreenUpdating = False
Dim path, img_name, img_ext, ws
path = "C:\Documents and Settings\All Users\Documents\Mes images\Échantillons d'images\"
img_ext = ".jpg"
For Each ws In ActiveWorkbook.Worksheets
img_name = Range("A1").Value
ws.Activate
ws.Range("D5").Select
ActiveSheet.Pictures.Insert(path & img_name & img_ext).Select
Next ws
Application.ScreenUpdating = True
End Sub
A modifier :
=> path : le cehmin du dossier ou se trouvent tes images
=>img_ext : extension de tes fichiers images
=>ws.Range("D5").Select : la cellule de référence pour inserer ton image
Voici un bot de code à adapter :
Sub images()
Application.ScreenUpdating = False
Dim path, img_name, img_ext, ws
path = "C:\Documents and Settings\All Users\Documents\Mes images\Échantillons d'images\"
img_ext = ".jpg"
For Each ws In ActiveWorkbook.Worksheets
img_name = Range("A1").Value
ws.Activate
ws.Range("D5").Select
ActiveSheet.Pictures.Insert(path & img_name & img_ext).Select
Next ws
Application.ScreenUpdating = True
End Sub
A modifier :
=> path : le cehmin du dossier ou se trouvent tes images
=>img_ext : extension de tes fichiers images
=>ws.Range("D5").Select : la cellule de référence pour inserer ton image