Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.charting
|
|||
|
|||
Chart title VBA
Further to previous....
I cannot set the chart title, the lines; oChart.Chart.HasTitle = True oChart.Chart.ChartTitle.Characters.Text = "Progress curve" both return errors, "cannot get..." I have been using the macro as a go-by but they all refer to activechart. Why is it that my code fails? Graham For i = 1 To 2 ' UBound(mArrUIP, 1) 'add new sheet mcXL.AddAsLastWorksheet CStr(mArrUIP(i, 1)) Set shtPlot = Worksheets(CStr(mArrUIP(i, 1))) 'add new chart to the new (active) sheet Set oChart = Worksheets(CStr(mArrUIP(i, 1))).ChartObjects.Add(ChtLeft, ChtTop, ChtWidth, ChtHeight) oChart.name = CStr(mArrUIP(i, 1)) & "_1" oChart.Chart.HasTitle = True oChart.Chart.ChartTitle.Characters.Text = "Progress curve" |
#2
Posted to microsoft.public.excel.charting
|
|||
|
|||
Chart title VBA
Hi,
Your chart needs data series in it before you can add and alter the chart title Cheers Andy -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info "graham_s" wrote in message ... Further to previous.... I cannot set the chart title, the lines; oChart.Chart.HasTitle = True oChart.Chart.ChartTitle.Characters.Text = "Progress curve" both return errors, "cannot get..." I have been using the macro as a go-by but they all refer to activechart. Why is it that my code fails? Graham For i = 1 To 2 ' UBound(mArrUIP, 1) 'add new sheet mcXL.AddAsLastWorksheet CStr(mArrUIP(i, 1)) Set shtPlot = Worksheets(CStr(mArrUIP(i, 1))) 'add new chart to the new (active) sheet Set oChart = Worksheets(CStr(mArrUIP(i, 1))).ChartObjects.Add(ChtLeft, ChtTop, ChtWidth, ChtHeight) oChart.name = CStr(mArrUIP(i, 1)) & "_1" oChart.Chart.HasTitle = True oChart.Chart.ChartTitle.Characters.Text = "Progress curve" |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Chart title | Charts and Charting in Excel | |||
Formula in Chart Title | Charts and Charting in Excel | |||
Excel chart - how to assign the file name in the chart title? | Charts and Charting in Excel | |||
Pasting Objects into Chart title and Axis title | Charts and Charting in Excel | |||
Chart Title | Charts and Charting in Excel |