Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default X-axis trouble


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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default X-axis trouble


Yep, that does it. I got it figured out at about the same time you did.
Thank you very much for the help.


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

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
Need PivotChart x axis to cross Y axis at minimum Y axis value Aaron Charts and Charting in Excel 1 August 17th 07 08:51 AM
trouble editing axis labels rossu Charts and Charting in Excel 2 May 2nd 07 07:35 PM
TO CREATE A LINE CHART WITH RATE IN Y AXIS & REAL TIME IN X AXIS vijaicbe Charts and Charting in Excel 4 November 9th 06 10:16 AM
Adding data on Axis Major Gridlines next to Category Axis Collums jblittlejohn New Users to Excel 0 July 10th 05 12:17 PM
How to insert X axis scale values next to axis and X axis grid lin vp23larry Charts and Charting in Excel 2 June 23rd 05 03:45 PM


All times are GMT +1. The time now is 02:31 AM.

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"