Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Setting the Chart name as the text from a cell.

Hey everyone,

So I have this code that scrolls through each column and uses each
column as the y-axis and outputs a different chart with each increment.
I was able to set up the title of each chart so that it shows the
heading of each column as the title, but now I want the tab on the
bottom of the chart to have this same title (which was obtained from
the first cell of each column). This is the code I have for the title
of each graph and it works fine :

ActiveChart.SeriesCollection(1).Name = "=Sheet1!R1C" & C
'C refers to the column index
The title is "Protein 1," which is located in Row 1 Column C.

But for some reason when I tried to use this code to change the tab
name of each chart, it didn't work:
ActiveChart.ChartTitle.Parent.Name = "=Sheet1!R1C" & C
Instead of displaying "Protein 1" on the chart tab on the bottom, it
displays: =Sheet1!R1C4
'The C value works and increments, but for some reason it doesn't see
the reference to output the text of the first row, 4th column cell.


Any ideas would be greatly appreciated!


Thanks,
Sareh

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Setting the Chart name as the text from a cell.


Idea - Not Solution

Change
ActiveChart.ChartTitle.Parent.Name = "=Sheet1!R1C" & C

to
ActiveChart.ChartTitle.Parent.Name = Sheet1!R1C.text & " " & C


--
mpeplow
------------------------------------------------------------------------
mpeplow's Profile: http://www.excelforum.com/member.php...o&userid=34812
View this thread: http://www.excelforum.com/showthread...hreadid=562177

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Setting the Chart name as the text from a cell.


Sorry, Ignore my last post. Basically you have your title enclosed wit
"" which usually tells the program to 'treat as string' you need t
have a non-text refernce or create a new text variable to store you
string in.

I know this does not solve your problem but I hope that you go
something out of it

--
mpeplo
-----------------------------------------------------------------------
mpeplow's Profile: http://www.excelforum.com/member.php...fo&userid=3481
View this thread: http://www.excelforum.com/showthread.php?threadid=56217

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
Setting rows to autofit wrapping text in a cell John Excel Discussion (Misc queries) 1 January 8th 10 12:22 AM
Setting up a cell that contains text and a data reference? Melanie Excel Worksheet Functions 5 February 28th 07 03:41 PM
Setting spaces between text in a cell Erik K via OfficeKB.com[_2_] Excel Programming 8 November 4th 05 10:23 AM
Setting text as a background in cell Brian Excel Worksheet Functions 1 December 9th 04 08:12 PM
setting cell contents to text using C# No Name Excel Programming 1 December 25th 03 09:58 PM


All times are GMT +1. The time now is 05:41 PM.

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"