Private Sub UserForm_Initialize()
Dim s As Shape, fichier$
Set s = [D6].Comment.Shape
fichier = ThisWorkbook.Path & "\MonImage.jpg"
s.CopyPicture Format:=xlBitmap
'---création du fichier JPEG---
With ActiveSheet.ChartObjects.Add(0, 0, s.Width, s.Height).Chart
.Paste
.Export fichier, "JPG"
.Parent.Delete
End With
'---chargement---
With Image1
.Width = s.Width
.Height = s.Height
.Picture = LoadPicture(fichier)
.Visible = False
End With
Kill fichier
End Sub
Private Sub Label1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Image1.Visible = True
End Sub
Private Sub UserForm_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Image1.Visible = False
End Sub