Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
PK PK is offline
external usenet poster
 
Posts: 69
Default This has to be easy.

I need to create a BLANK chart using VBA and rename it.
I am using Charts.Add

The problem i keep running into is that when i create a new chart, it
increments chart1 then chart2, etc... even if i rename the new chart

I am creating a module to be used in MSAccess to automate excel, so i will
not have the luxury of knowing what the new chart name will be.

It would be great if i could do something like

VariableNewChartName = Charts.Add
Sheets(VariableNewChartName ).Name = VariableMyNewName



or something like that



  #2   Report Post  
Posted to microsoft.public.excel.charting
PK PK is offline
external usenet poster
 
Posts: 69
Default This has to be easy.

Got it:

Dim Chrt As Chart

Set Chrt = Charts.Add
With Chrt
.Name = "freddykruger"
End With




"PK" wrote:

I need to create a BLANK chart using VBA and rename it.
I am using Charts.Add

The problem i keep running into is that when i create a new chart, it
increments chart1 then chart2, etc... even if i rename the new chart

I am creating a module to be used in MSAccess to automate excel, so i will
not have the luxury of knowing what the new chart name will be.

It would be great if i could do something like

VariableNewChartName = Charts.Add
Sheets(VariableNewChartName ).Name = VariableMyNewName



or something like that



  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 6,582
Default This has to be easy.

Or simply:

Charts.Add.Name = "My New Chart"

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"PK" wrote in message
...
Got it:

Dim Chrt As Chart

Set Chrt = Charts.Add
With Chrt
.Name = "freddykruger"
End With




"PK" wrote:

I need to create a BLANK chart using VBA and rename it.
I am using Charts.Add

The problem i keep running into is that when i create a new chart, it
increments chart1 then chart2, etc... even if i rename the new chart

I am creating a module to be used in MSAccess to automate excel, so i
will
not have the luxury of knowing what the new chart name will be.

It would be great if i could do something like

VariableNewChartName = Charts.Add
Sheets(VariableNewChartName ).Name = VariableMyNewName



or something like that





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
Easy one....Right? egeorge4 Excel Discussion (Misc queries) 4 May 12th 06 06:13 PM
How to sum in an easy way? [email protected] Excel Discussion (Misc queries) 7 April 20th 06 02:38 PM
This should be easy Kypreo Excel Worksheet Functions 5 November 22nd 05 05:28 AM
Here's an EASY one for you, not me :( barbierim Excel Worksheet Functions 4 October 28th 05 12:36 AM
new user with easy question? not easy for me speakeztruth New Users to Excel 5 June 3rd 05 09:40 PM


All times are GMT +1. The time now is 01:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"