Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Pie charts in Macros

I have recorded a macro in Excel whereby I create a pie chart using
the Chart Wizard.

In Page 3 of the Chart Wizard, I click on the "Data Labels" tab.

Then I check the "Category Name" and "Value" boxes.

However, when I run the macro, the finished chart does not show either
Category Names or Values.

You will see from the code that it doesn't even show up.

Range("A4:B9").Select
Charts.Add
ActiveChart.ChartType = xlPie
ActiveChart.SetSourceData Source:=Sheets("Test
Spreadsheet").Range("A4:B9"), _
PlotBy:=xlColumns
ActiveChart.Location Whe=xlLocationAsNewSheet,
Name:="Statistics"
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = _
"Statistics"
End With
ActiveChart.HasLegend = False

Any ideas?

Kind regards

Ian M
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
Macros behind charts DKS Charts and Charting in Excel 1 April 18th 09 03:03 PM
Formatting Charts Using Macros neesie214 Excel Discussion (Misc queries) 1 March 27th 09 12:23 PM
make macros in charts jana Charts and Charting in Excel 1 November 18th 08 08:57 AM
How do I update charts using macros Seng Charts and Charting in Excel 3 November 29th 05 06:02 PM
Macros & pie charts LMercier Charts and Charting in Excel 1 December 17th 04 02:11 PM


All times are GMT +1. The time now is 12:00 AM.

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

About Us

"It's about Microsoft Excel"