LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default naming charts


Thanks Andy!
I hadn't considered that.

--
Mariano


"Andy Pope" wrote:

As the chart is embedded you need to use

ActiveChart.parent.name = "HourChart"

Cheers
Andy

Mariano B. wrote:
Tushar,

I'm creating some charts and I want to name them as they are created for
further use on my macro, but i've been having trouble with it. I get an error
every time I try to rename the chart.
Here's my code :

Sub IPChart()
Charts.Add
With ActiveChart
.ChartType = xlColumnStacked
.SetSourceData Source:=Sheets("Recortadores").Range("B37:L94"),
PlotBy:=xlColumns
.Location xlLocationAsObject, name:="Recortadores"
End With

'To make sure there is a name, I always get "Recortadores Chart x"
MsgBox ActiveChart.name

ActiveChart.name = "HourChart"
End Sub


Sub prueba()
If ChartExists("Recortadores", "IPInfoChart") Then
MsgBox "ok"
End If
End Sub


I hope you can help me with this.
Greetings


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info

 
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
link excel charts to web pages and update charts automatically Signguy Charts and Charting in Excel 1 April 22nd 08 08:29 PM
Help with naming Mike Busch[_2_] Excel Discussion (Misc queries) 2 January 8th 08 12:04 AM
Naming charts on own sheet BoRed79 Charts and Charting in Excel 3 July 2nd 07 01:05 PM
tab naming [email protected] Excel Worksheet Functions 3 November 17th 06 07:24 PM
Tab naming Pedro AM Excel Discussion (Misc queries) 1 April 3rd 06 12:31 PM


All times are GMT +1. The time now is 02:51 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"