Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problems changing Embedded Chart Name

I've been having problems naming some charts, whose name I will need
later in my macro.
Here is 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

Among other things, I want to know if a given chart exists like this:

Function ChartExists(hoja As String, name As String) As Boolean
Dim C As ChartObject
On Error Resume Next
Set C = Sheets(hoja).ChartObjects(name)
If Err = 0 Then
ChartExists = True
Else
ChartExists = False
End If
End Function


Anyone has any ideas???

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
Problems with embedded merged Mark Excel Worksheet Functions 3 February 8th 09 05:47 AM
Editing problems with embedded Excel objects Andre Excel Discussion (Misc queries) 0 June 11th 07 09:46 PM
Changing Chart Location Problems *Dave* Charts and Charting in Excel 1 February 11th 07 01:34 AM
Changing embedded file name Richard Excel Programming 2 September 28th 05 09:04 AM
Embedded VB Forms Font Problems afiack Excel Programming 2 August 10th 04 08:28 PM


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