Private Sub UserForm_Initialize()
Application.ScreenUpdating = False
Sheets('BDDY').Range('A1:E25').CopyPicture
Sheets('BDDY').Paste
With Sheets('BDDY').ChartObjects.Add(0, 0, Image1.Width, Image1.Height).Chart
.Paste
.Export ThisWorkbook.Path & '\\fichierTemp.jpg', 'JPG'
End With
With Sheets('BDDY')
.ChartObjects(Sheets('BDDY').ChartObjects.Count).Delete
.Shapes(Sheets('BDDY').Shapes.Count).Delete
End With
Image1.Picture = LoadPicture(ThisWorkbook.Path & '\\fichierTemp.jpg')
Application.ScreenUpdating = True
End Sub
Private Sub UserForm_Terminate()
Kill ThisWorkbook.Path & '\\fichierTemp.jpg'
End Sub