Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need PivotChart x axis to cross Y axis at minimum Y axis value | Charts and Charting in Excel | |||
trouble editing axis labels | Charts and Charting in Excel | |||
TO CREATE A LINE CHART WITH RATE IN Y AXIS & REAL TIME IN X AXIS | Charts and Charting in Excel | |||
Adding data on Axis Major Gridlines next to Category Axis Collums | New Users to Excel | |||
How to insert X axis scale values next to axis and X axis grid lin | Charts and Charting in Excel |