ich würde gerne einen Teil einer Excel-Tabelle als jpeg speichern und in ein "Image", das in einer "Form" integriert ist einfügen. Und das per Knopfduck. Aus meinen schwachen VBA-Kenntnissen habe ich versucht, etwas zu basteln, was aber nicht funktioniert. Kann mir jemand weiterhelfen und das Macro korrigieren?
Dim sFile As String
sFile = ThisWorkbook.Path & "\Statistik.jpeg"
Range("C1:K46").Select
Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture
Selection.Export sFile
With frm_result
.Img_result.Picture = LoadPicture(sFile)
.Img_result.PictureSizeMode = fmPictureSizeModeZoom
.Show
End With
Kill sFile