PC Review


Reply
Thread Tools Rate Thread

Charts in VBA

 
 
New Member
Join Date: Jul 2011
Posts: 9
 
      30th Jul 2011
Hi I have a chart in excel and I want the chart to be displayed into a user form, Im not quite sure where Im going wrong, any help would be greatfull. Below is my code to output the chart.


Private Sub CommandButton1_Click()
Dim FilePathNameOfChart As String, CurrentChart As Object

Set CurrentChart = Sheets(1).ChartObjects(1).Chart

FilePathNameOfChart = Lecture_10 & "\Chart1.gif"

CurrentChart.Export FileName:=FilePathNameOfChart, FilterName:="GIF"

Image1.Picture = LoadPicture(FilePathNameOfChart)



End Sub



Thanks
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to run on all files in a folder but exclude sheets with PivotTable, Pivot Charts and Charts Nasir Microsoft Excel Programming 16 11th Mar 2011 04:13 PM
Aligning tick marks and labels on line charts or scatter charts AdamK Microsoft Excel Discussion 2 18th May 2009 06:20 PM
link excel charts to web pages and update charts automatically Signguy Microsoft Excel Charting 1 22nd Apr 2008 08:29 PM
Copy/Paste Charts; Define Destination of Charts in PowerPoint ryguy7272 Microsoft Excel Programming 2 24th Jan 2008 08:04 PM
Distribute dynamically charts with linked data as stand-alone charts Richard Microsoft Excel Programming 2 31st Mar 2004 05:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:06 AM.