Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Manipulating Excel pie charts with VB
as posted in excel.charting:
Are you using Excel 97? If so, you can fix this by adding a line at the top of the code: ActiveCell.Activate Or, in the properties for the Command button, change the TakeFocusOnClick property to False. Gemma Batterby wrote: 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?? -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with manipulating data in excel? | Excel Discussion (Misc queries) | |||
Help with manipulating text in Excel 2003 | Excel Discussion (Misc queries) | |||
Training on Manipulating Data in Excel | Excel Discussion (Misc queries) | |||
Manipulating Excel pie charts with VB | Excel Programming | |||
Manipulating Excel pie charts with VB | Excel Programming |