#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default .AxisTitle

Hi Peter,

This will link the axistitle to the cell B1.
.Axes(xlCategory, xlPrimary).AxisTitle.Text = "=" &
Range("B1").Parent.Name & "!" & Range("B1").Address(ReferenceStyle:=xlR1C1)

Any changes in B1 will automatically be reflected in the chart.
Note that you can not append text, i.e. (lbs), when the text is linked.
Therefore this must be done within the cell B1.


peter wrote:
i'm sorry, i should have clarified that B1 has contents
that can change, thus the need for having B1 read into the
title. for example B1 might say Drive, or it might say
Force, etc....



-----Original Message-----
can anyone tell me how I can do this? cause i'm doing it
wrong....

this line of code:

..Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text =
Range("B1").Value & " (lbs)"

the cell contents of B1 just has the following: Drive

maybe it's not even possible to do something like this?


i

thought i'd run it by people more familiar with vba.

Thanks much in advance!
.


--

Cheers
Andy

http://www.andypope.info

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



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