Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
I have used the following code to generate a chart in my sheet: --Code Sub MakeAPie() Dim title As String Dim getstr1 As String Dim getstr2 As String title = "A1" getstr1 = "A3:A9" getstr2 = "E3:E9" Dim chtOb As ChartObject Set chtOb = ActiveSheet.ChartObjects.Add(100, 100, 250, 175) With chtOb.Chart .ChartType = xlPie .SeriesCollection.NewSeries .SeriesCollection(1).XValues = ActiveSheet.Range(getstr1) .SeriesCollection(1).Values = ActiveSheet.Range(getstr2) .SeriesCollection(1).Name = ActiveSheet.Range(title) End With End Sub --Code But I am not able to figure out how to add data labels (category & percentage) to the chart generated above. And also I get the chart as an object in my active sheet. How do I write the code to get it to display in a new sheet? Would appreciate any help on this one. Thanks, |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Charts - Align value & category data labels independently | Charts and Charting in Excel | |||
Inserting a new line when external data changes | Excel Discussion (Misc queries) | |||
XL Charts: Let my mouse drag all data labels for a whole series. | Charts and Charting in Excel | |||
Excel charts should let me select a range for data labels. | Charts and Charting in Excel | |||
Sort pages? | Excel Discussion (Misc queries) |