Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default How to link a chart title to a worksheet cell c#?

Hello,

it is possible to link a chart title to a cell via vba macro:

Sub Makro2()
ActiveSheet.ChartObjects("Diagramm 1").Activate
ActiveChart.ChartTitle.Select
Selection.Text = "=Tabelle1!R1C3"
End Sub

How do I do this in c#?

Just puting this code
string newTitle = "=Tabelle1!R1C3"

chart.ChartTitle.Text = newTitle.ToString() ;

....gets only the content of existing cell and puts ot to chart title.

The formula is not getting.



Thanks
Frank


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to link a chart title to a worksheet cell c#?


Hello Frank,

Change your code to the following...

Sub Makro2()
ActiveSheet.ChartObjects("Diagramm 1").Activate
ActiveChart.ChartTitle.Text = Evaluate("=Tabelle1!R1C3")
End Sub

Sincerely,
Leith Ros

--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=54648

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default How to link a chart title to a worksheet cell c#?

Hello Leith,
your solution does work as makro.

I need c# solution.
How does your function will be written in c# ?

Thanks
Frank



"Leith Ross"
schrieb im Newsbeitrag
...

Hello Frank,

Change your code to the following...

Sub Makro2()
ActiveSheet.ChartObjects("Diagramm 1").Activate
ActiveChart.ChartTitle.Text = Evaluate("=Tabelle1!R1C3")
End Sub

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile:
http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=546485



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
Chart Title Link to Data Table GasGal Charts and Charting in Excel 1 March 6th 09 12:09 AM
link chart title? Dave Breitenbach Charts and Charting in Excel 2 November 17th 05 11:44 PM
adding link to chart title using VB Ken Shaffer Excel Programming 1 November 8th 05 12:00 AM
Chart Title as a Cell in a worksheet John Baker Excel Programming 11 October 3rd 04 02:22 AM
VBA: Link Chart Title to Drop Down Menu toddanderson1 Excel Programming 3 May 27th 04 05:32 PM


All times are GMT +1. The time now is 11:08 PM.

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"