Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problems with embedded merged | Excel Worksheet Functions | |||
Editing problems with embedded Excel objects | Excel Discussion (Misc queries) | |||
Changing Chart Location Problems | Charts and Charting in Excel | |||
Changing embedded file name | Excel Programming | |||
Embedded VB Forms Font Problems | Excel Programming |