Yes, but strech make an awful mess of the chart, even as narrow you try to
get ratio fixed.
Mode does the job, but I find the GIF become lousy quality as well. If you
save the chart in the same size as you later want in GIF, the quality will
be fine.
If I try to copy and paste a chart first and enlarger the new chart and then
delete it make good pictures, but I find Excel to slow to copy paste a
chartobject, even if you of course use screenupdating = false.
/Regards
"Tushar Mehta" skrev i meddelandet
...
Have you tried adjusting the userform control's PictureSizeMode
property? There are three possibilities and the value
fmPictureSizeModeZoom (or maybe fmPictureSizeModeStretch) should do the
job.
--
Regards,
Tushar Mehta www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
I have this code in a userform and get with it a picture in the same
size
as the chartobject - to small. I want a much larger (fill the screen
as
much as possible). I can easily solve it by changing size of the
chartobject before export to gif, but i dno't want to do that. I want
to
change the size of the gif during or after importing it by
LoadPicture.
How?
Help = Forever happy
/Regards
Dim ChartNum As Integer
Private Sub UserForm_Initialize()
Debug.Print "frmPPT initilize "
ChartNum = 1
UpdateChart
End Sub
Private Sub UpdateChart()
Set CurrentChart = Blad102.ChartObjects(ChartNum).Chart
' Save chart as GIF
Fname = ThisWorkbook.Path & Application.PathSeparator & "temp.GIF"
CurrentChart.Export Filename:=Fname, FilterName:="GIF"
' Show the chart
Image1.Picture = LoadPicture(Fname)