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