Bonjour,
A tester, colle ces deux codes dans la feuille de ton classeur
Sub test()
Dim zz As String, g As String, xx As String
Dim myPicture As Object
Dim d As Byte
On Error GoTo 1
Application.DisplayAlerts = False
aa = Application.GetOpenFilename
zz = Dir(aa)
d = Len(zz)
Do Until g = "."
g = Mid(zz, d, 1)
d = d - 1
Loop
xx = Left(zz, Len(zz) - (Len(zz) - d))
Range("B2") = xx
Set myPicture = ActiveSheet.Pictures.Insert(aa)
With myPicture.ShapeRange
.Left = Range("B3").Left
.Top = Range("B3").Top
' .Height = Range("H3:H11").Height
'.Width = Range("B3:C3").Width
End With
Application.DisplayAlerts = True
End
1 MsgBox "Le fichier sélectionné n'est pas une image.": On Error GoTo 0: Application.DisplayAlerts = True: Exit Sub
End Sub
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Count = 1 And Not Intersect(Target, Range("B2:B20")) Is Nothing Then test
Cancel = True
End Sub
Amicalement
Pierrot
Re
Ton fichier avec les codes