Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 262
Default object browser, and adding and deleting charts

Hello,
In the Charts collection, there is an Add function.
In the object browser, the add function is described as follows€¦

Function Add([Before], [After], [Count]) As Chart

By doing some experimenting with code text I learned that when using €śAdd€ť I
can also specify a name for a chart if I use the following text which is not
shown in the Object browser, and does not show up as a prompt when I enter
the text.

Chart_Name_for_My_New_Chart = €śMyChart1€ť
Charts.Add.Name = Chart_Name_for_My_New_Chart


I tried the same approach with Charts.Delete, without success.

I tried€¦

Chart_Name_for_My_Old_Chart = €śMyChart1€ť
Charts.Delete.Name = Chart_Name_for_My_Old_Chart

So this brings me to two questions.
First, how might I have discovered the Charts.Add.Name code language using
the documentation or the object browser, and

Second, is there any corresponding, but seemingly undocumented code I can
use with Charts.Delete to delete one specific chart?

Thanks very much.

Keith



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default object browser, and adding and deleting charts

Keith: Your double quotes aren't compatible with the US version of excel. I
think it is due to the fact you are using one of the internation versions of
excel. The code below will add and then delete your chart.

Chart_Name_for_My_New_Chart = "MyChart1"
Charts.Add
ActiveChart.Name = Chart_Name_for_My_New_Chart

Set mychart = Charts("MyChart1")

mychart.Delete

"keith" wrote:

Hello,
In the Charts collection, there is an Add function.
In the object browser, the add function is described as follows€¦

Function Add([Before], [After], [Count]) As Chart

By doing some experimenting with code text I learned that when using €śAdd€ť I
can also specify a name for a chart if I use the following text which is not
shown in the Object browser, and does not show up as a prompt when I enter
the text.

Chart_Name_for_My_New_Chart = €śMyChart1€ť
Charts.Add.Name = Chart_Name_for_My_New_Chart


I tried the same approach with Charts.Delete, without success.

I tried€¦

Chart_Name_for_My_Old_Chart = €śMyChart1€ť
Charts.Delete.Name = Chart_Name_for_My_Old_Chart

So this brings me to two questions.
First, how might I have discovered the Charts.Add.Name code language using
the documentation or the object browser, and

Second, is there any corresponding, but seemingly undocumented code I can
use with Charts.Delete to delete one specific chart?

Thanks very much.

Keith



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 262
Default object browser, and adding and deleting charts

HI Joel,
Thanks very much. I'll try that code.
Keith

"joel" wrote:

Keith: Your double quotes aren't compatible with the US version of excel. I
think it is due to the fact you are using one of the internation versions of
excel. The code below will add and then delete your chart.

Chart_Name_for_My_New_Chart = "MyChart1"
Charts.Add
ActiveChart.Name = Chart_Name_for_My_New_Chart

Set mychart = Charts("MyChart1")

mychart.Delete

"keith" wrote:

Hello,
In the Charts collection, there is an Add function.
In the object browser, the add function is described as follows€¦

Function Add([Before], [After], [Count]) As Chart

By doing some experimenting with code text I learned that when using €śAdd€ť I
can also specify a name for a chart if I use the following text which is not
shown in the Object browser, and does not show up as a prompt when I enter
the text.

Chart_Name_for_My_New_Chart = €śMyChart1€ť
Charts.Add.Name = Chart_Name_for_My_New_Chart


I tried the same approach with Charts.Delete, without success.

I tried€¦

Chart_Name_for_My_Old_Chart = €śMyChart1€ť
Charts.Delete.Name = Chart_Name_for_My_Old_Chart

So this brings me to two questions.
First, how might I have discovered the Charts.Add.Name code language using
the documentation or the object browser, and

Second, is there any corresponding, but seemingly undocumented code I can
use with Charts.Delete to delete one specific chart?

Thanks very much.

Keith



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
Object Browser Icons dhstein Excel Discussion (Misc queries) 2 June 19th 09 12:15 AM
Adding a DLL to Excel (2003) Object Browser Mac Lingo Excel Programming 2 December 8th 08 09:26 PM
Object Browser does what? davegb Excel Programming 6 June 27th 05 06:12 PM
Object Browser Help [email protected] Excel Programming 0 January 6th 05 08:19 PM
Object Browser Help [email protected] Excel Programming 0 January 6th 05 08:18 PM


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