LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default Chart Picture Size in UserForm/Picture Control.

Another question,
I need to set chart exported to a specific size to fit in
UserForm/ImageControl. Since the chat is large, only small portion of of is
being displayed. I tried other options of changing PictureSizeMode between 0,
1 and 3, but this is not what I need. Anyone has ideas? I am using John's URL
http://j-walk.com/ss/excel/tips/tip66.htm to fit according to my need. Code
is below.

Dim MyChart As Chart
Dim ChartNum As Integer

Private Sub UserForm_Initialize()
ChartNum = 1
UpdateChart
End Sub

Private Sub CloseButton_Click()
Unload Me
Kill (ThisWorkbook.Path & Application.PathSeparator & "temp.gif")
End Sub

'Declare Chart as variable
Private Sub UpdateChart()
Set MyChart = Charts("Tool Sales2")

' Save chart as GIF
Fname = ThisWorkbook.Path & Application.PathSeparator & "temp.gif"
MyChart.Export FileName:=Fname, FilterName:="GIF"

' Show the chart
Image1.Picture = LoadPicture(Fname)
End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connect a number to a picture bank and import that picture to exce Dennis Hedo Excel Discussion (Misc queries) 1 March 22nd 10 02:17 PM
Saving chart as picture - how to maintain the same size of the fil Martin Charts and Charting in Excel 3 February 22nd 08 06:03 PM
insert a picture in to a comment but picture not save on hard disk Pablo Excel Discussion (Misc queries) 0 February 21st 07 03:48 PM
Programatically control picture property of Image control Brassman[_5_] Excel Programming 5 May 24th 05 09:32 PM
copy charts & paste as picture, hide chart, size & place same picture as chart Gunnar Johansson Excel Programming 0 October 30th 04 01:22 AM


All times are GMT +1. The time now is 10:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"