Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Manipulating Excel pie charts with VB

Gemma,

I could only get it to work by selecting:

ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.SeriesCollection(1).DataLabels.Select
ActiveChart.SeriesCollection(1).Points(9).DataLabe l.Select
With Selection
.Font.Size = 10
End With

Would love to learn how to do this without selecting (use this macro all the
time).

steve

"Gemma Batterby" wrote in message
...
I am trying to set up a command button which upon clicking
allows all the data labels of a pie chart to be set to a
certain font size.
The code is as follows:

Worksheets("Callouts Classification").ChartObjects
(chartNum).Chart.SeriesCollection(1).DataLabels
(labelNum).Font.Size = 6

where chartNum and labelNum are obviously variables. The
pie charts are created using the chart wizard and I am
simply manipulating them using some VB code. When the
code is run from the VB environment it works fine but when
I run the code by clicking the command button I get an
error message saying:

Runtime Error 1004
Unable to set the Size property of the Font class

Any ideas as to why this might be when clicking the
command button??



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
Manipulating Excel Online and/or for Many Shared Users ChrisNeedsHelp Excel Discussion (Misc queries) 3 October 14th 08 07:55 PM
Manipulating ranges in a different excel file Lenchik Excel Worksheet Functions 3 October 13th 08 03:51 AM
Help with manipulating data in excel? jock Excel Discussion (Misc queries) 3 July 29th 08 03:24 PM
Help with manipulating text in Excel 2003 Big UT Fan Excel Discussion (Misc queries) 4 April 9th 08 07:33 PM
Training on Manipulating Data in Excel Rufus Excel Discussion (Misc queries) 1 October 18th 05 05:07 AM


All times are GMT +1. The time now is 08:55 AM.

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"