C
CG Rosen
Hi Group,
The code below loads a chart from a worksheet into an image in a userform.
Is it at all possible to use the some approach to load a picture inserted in
a
worksheet into the userform image?
Brgds
CG Rosén
Set CurrentChart = Sheets("Sheet1").ChartObjects(1).Chart
'Save chart as GIF
Fname = ThisWorkbook.Path & Application.PathSeparator & "temp.gif"
CurrentChart.Export Filename:=Fname, FilterName:="GIF"
'Show the chart
UserForm1.Image1.Picture = LoadPicture(Fname)
Kill (ThisWorkbook.Path & Application.PathSeparator & "temp.gif")
The code below loads a chart from a worksheet into an image in a userform.
Is it at all possible to use the some approach to load a picture inserted in
a
worksheet into the userform image?
Brgds
CG Rosén
Set CurrentChart = Sheets("Sheet1").ChartObjects(1).Chart
'Save chart as GIF
Fname = ThisWorkbook.Path & Application.PathSeparator & "temp.gif"
CurrentChart.Export Filename:=Fname, FilterName:="GIF"
'Show the chart
UserForm1.Image1.Picture = LoadPicture(Fname)
Kill (ThisWorkbook.Path & Application.PathSeparator & "temp.gif")