Thread: X-axis trouble
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Wolf Wolf is offline
external usenet poster
 
Posts: 19
Default X-axis trouble

Hi Brian,

I suppose you variables are defined as "Range", therefore please try

Set ActiveChart.Axes(xlValue).MinimumScale = range("Chart_Date_Pmonth").value
Set ActiveChart.Axes(xlValue).MaximumScale = range("Chart_Date_Tmonth").value

Best regards

Wolf

"BrianDP1977" wrote:


I'm using the below code to try to define the min and max of the x range
on a chart with two numbers that I have dynamically named in a cell
(Chart_Date_Pmonth and Chart_Date_Tmonth). These numbers change over
time. However, I cannot get the code to accept these named variables.


Code:
--------------------
ActiveChart.Axes(xlValue).Select
Set ActiveChart.Axes(xlValue).MinimumScale = Chart_Date_Pmonth
Set ActiveChart.Axes(xlValue).MaximumScale = Chart_Date_Tmonth
--------------------


--
BrianDP1977
------------------------------------------------------------------------
BrianDP1977's Profile: http://www.excelforum.com/member.php...o&userid=29110
View this thread: http://www.excelforum.com/showthread...hreadid=490530