job75
XLDnaute Barbatruc
Bonsoir à tous,
Ce fil était intéressant :
https://www.excel-downloads.com/threads/erreur-dexecution-424.216992/
Je joins le fichier auquel j'ai abouti avec le fichier joint et cette macro :
	
	
	
	
	
		
A+
	
		
			
		
		
	
				
			Ce fil était intéressant :
https://www.excel-downloads.com/threads/erreur-dexecution-424.216992/
Je joins le fichier auquel j'ai abouti avec le fichier joint et cette macro :
		Code:
	
	
	Private Sub UserForm_Initialize()
Dim fichier$
MultiPage1.Value = 0 'par exemple la 1ère page
fichier = ThisWorkbook.Path & "\MonImage.jpg"
With Range("B1:H" & Range("B65000").End(xlUp).Row)
  .CopyPicture Format:=xlBitmap
  'création du fichier JPEG
  With ActiveSheet.ChartObjects.Add(0, 0, .Width + 5, .Height + 5).Chart
    .Paste
    .Export fichier, "JPG"
    .Parent.Delete
  End With
  'chargement de l'image et suppression du fichier
  Image1.Picture = LoadPicture(fichier)
  Kill fichier
  'dimensionnement
  Image1.Height = .Height + 5
  Image1.Width = .Width + 5
  Frame1.ScrollHeight = .Height + 5
  Frame1.ScrollWidth = .Width + 5
End With
End Sub