LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Chart into Userform Problem

Can some kind sole please help me here.

I am display 13 charts one at a time into a userform via a drop down box
titled: ChartType

I have adapted the coding from John Walkenbach's site
http://j-walk.com/ss/excel/tips/tip66.htm

But the problem I get is that it displays the wrong chart. It works fine
for Chart 1 but after that it just seams to go loopy when I try and load in
another chart

Any suggestions would be greatly appreciated.



--------------------------------------------
Dim ChartNo As Integer

Private Sub GetChart_Click()
ChartNo = 0
CheckValue = Charts.ChartType.ListIndex + 1

ChartNo = CheckValue
UpdateChart

End Sub


Private Sub UpdateChart()

Set CurrentChart = Sheets("Charts").ChartObjects(ChartNo).Chart
CurrentChart.Parent.Width = 420
CurrentChart.Parent.Height = 190

' Save chart as GIF
Fname = ThisWorkbook.Path & Application.PathSeparator & "temp.gif"
CurrentChart.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
Userform Import problem Hedghog Excel Discussion (Misc queries) 0 June 2nd 10 01:57 PM
Userform problem? law Excel Discussion (Misc queries) 0 December 3rd 07 07:54 PM
userform problem TUNGANA KURMA RAJU Excel Discussion (Misc queries) 0 August 10th 06 04:43 AM
Userform problem (Listindex) jgmiddel Excel Discussion (Misc queries) 1 April 26th 06 01:34 PM
UserForm Recall Problem Andy Tallent Excel Discussion (Misc queries) 1 April 15th 05 06:14 PM


All times are GMT +1. The time now is 09:08 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"