PC Review


Reply
Thread Tools Rate Thread

How to add a title to a chart by means of Excel automation?

 
 
dotNeter
Guest
Posts: n/a
 
      20th Nov 2006
It's easy when using VBA code, like,
..ChartTitle.Characters.Text = "Hello"

But, setting a Text or Characters property of chartTitle always got an
exception. Is it possible doing that?

code excerpt in vb.net

objChart = objSheet.ChartObjects.Add(50, 40, 300, 200).Chart
objChart.SetSourceData(Source:=objSheet.Range("A1").Resize(cNumRows,
cNumCols))
objChart.ChartTitle.Characters.Text = "Hello" <---- here!!!

Thx in advance.

 
Reply With Quote
 
 
 
 
Peter T
Guest
Posts: n/a
 
      20th Nov 2006
After applying the source data and before applying the title text

objChart.HasTitle = True

Regards,
Peter T

"dotNeter" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> It's easy when using VBA code, like,
> .ChartTitle.Characters.Text = "Hello"
>
> But, setting a Text or Characters property of chartTitle always got an
> exception. Is it possible doing that?
>
> code excerpt in vb.net
>
> objChart = objSheet.ChartObjects.Add(50, 40, 300, 200).Chart
> objChart.SetSourceData(Source:=objSheet.Range("A1").Resize(cNumRows,
> cNumCols))
> objChart.ChartTitle.Characters.Text = "Hello" <---- here!!!
>
> Thx in advance.
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extracting chart title from Embedded Excel Chart in PowerPoint Barb Reinhardt Microsoft Excel Programming 1 11th Jun 2008 02:22 PM
Extracting chart title from Embedded Excel Chart in PowerPoint Barb Reinhardt Microsoft Powerpoint 0 11th Jun 2008 01:31 PM
Extracting Excel.Chart title from Embedded Excel Chart in PowerPoi Barb Reinhardt Microsoft Excel Programming 1 11th Jun 2008 01:30 PM
Automation of Dynamic Chart Title and legend changes Boon8888 Microsoft Excel Charting 1 3rd Feb 2006 11:00 PM
Excel chart - how to assign the file name in the chart title? =?Utf-8?B?VEdyZWVu?= Microsoft Excel Charting 1 16th Aug 2005 10:35 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:38 AM.