Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default macro to create a chart

what's missing so I can run it successfully.

Sub Macro5()

CHARTS.Add
ActiveChart.ChartType = xlLine
ActiveChart.SetSourceData Source:=Sheets("DATA").Range
("A1:BJ145"), PlotBy _
:=xlRows
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(1).Values = "=DATA!
R6C2:R6C256"
ActiveChart.Location Whe=xlLocationAsNewSheet
ActiveChart.HasLegend = False
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 100
Default macro to create a chart

Hi

What is your error message. Worked for me.

Tony
-----Original Message-----
what's missing so I can run it successfully.

Sub Macro5()

CHARTS.Add
ActiveChart.ChartType = xlLine
ActiveChart.SetSourceData Source:=Sheets("DATA").Range
("A1:BJ145"), PlotBy _
:=xlRows
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(1).Values = "=DATA!
R6C2:R6C256"
ActiveChart.Location Whe=xlLocationAsNewSheet
ActiveChart.HasLegend = False
End Sub
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default macro to create a chart

I have some hints on charting and VBA he

http://peltiertech.com/Excel/ChartsH...kChartVBA.html

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
http://PeltierTech.com/Excel/Charts/
_______


alldreams wrote:

what's missing so I can run it successfully.

Sub Macro5()

CHARTS.Add
ActiveChart.ChartType = xlLine
ActiveChart.SetSourceData Source:=Sheets("DATA").Range
("A1:BJ145"), PlotBy _
:=xlRows
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(1).Values = "=DATA!
R6C2:R6C256"
ActiveChart.Location Whe=xlLocationAsNewSheet
ActiveChart.HasLegend = False
End Sub


Reply
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
Create a Chart using a Macro Scott_goddard Charts and Charting in Excel 1 April 8th 10 10:26 AM
Macro to create a new chart kimbobo Charts and Charting in Excel 1 August 18th 06 02:44 PM
VB Macro to Create a Chart [email protected] Excel Discussion (Misc queries) 0 August 15th 06 10:25 PM
Setting up Macro to create pie chart. Hamish Charts and Charting in Excel 2 August 8th 06 02:30 PM
Problem with using a macro to create a chart lopsided[_8_] Excel Programming 2 February 6th 04 10:50 AM


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