Private Sub ListBox1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
ligne = Int(Y / (ListBox1.Font.Size * 1.24))
ListBox1.ListIndex = ListBox1.TopIndex + ligne
Set feuilImage = Sheets("échantignole") 'feuille contenant les images
' For Each s In yuy.Shapes
' MsgBox s.Name
' Next
nomImage = ListBox1.List(ListBox1.ListIndex)
With feuilImage
On Error Resume Next
Set img = .Shapes(nomImage)
On Error GoTo 0
If IsEmpty(img) Then ImageUsf.Picture = LoadPicture(""): Exit Sub
img.CopyPicture
.ChartObjects.Add(Me.Left, Me.Top, img.Width, img.Height).Chart.Paste
.ChartObjects(1).Chart.Export Filename:="imageTemp.jpg"
.Shapes(.Shapes.Count).Delete
End With
ImageUsf.SHOW
With ImageUsf
.PictureSizeMode = fmPictureSizeModeZoom
.Picture = LoadPicture("imageTemp.jpg")
End With
Kill "imageTemp.jpg"
End Sub