Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi. In a worksheet I have some code which automatically updates the Gridlines
each time new source data is updated. It has been working fine however for some reason now, it updates whilst going through the code, but when a cell is chosen outside the graph eg cell A8, it resorts back to the original scale. Code as follows: With ActiveChart.Axes(xlValue) .MinimumScale = 0 .MaximumScale = 40000000 .MinorUnit = 200000 .MajorUnit = 5000000 .Crosses = xlAutomatic .ReversePlotOrder = False .ScaleType = xlLinear .DisplayUnit = xlNone End With Range("A8").Select Can anyone see what is going wrong here and why the gridlines don't stay on the scale above? Cheers. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Where is the code? In the worksheet module? This piece of code doesn't
respond to any changing values, it sets the major and minor unit (which set the gridline spacing) to constant values. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Ant" wrote in message ... Hi. In a worksheet I have some code which automatically updates the Gridlines each time new source data is updated. It has been working fine however for some reason now, it updates whilst going through the code, but when a cell is chosen outside the graph eg cell A8, it resorts back to the original scale. Code as follows: With ActiveChart.Axes(xlValue) .MinimumScale = 0 .MaximumScale = 40000000 .MinorUnit = 200000 .MajorUnit = 5000000 .Crosses = xlAutomatic .ReversePlotOrder = False .ScaleType = xlLinear .DisplayUnit = xlNone End With Range("A8").Select Can anyone see what is going wrong here and why the gridlines don't stay on the scale above? Cheers. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Yes, this is just an excerpt from the full code within the worksheet module.
It does set the major and minor unit, however when the macro has finished the gridlines revert back to the previous scale. When I step through the code line by line, I can actually see the gridlines changing to what the code specifies, however once it steps out of the graph (ie to cell A8) the scale changes back to the old scale....which I cannot explain. "Jon Peltier" wrote: Where is the code? In the worksheet module? This piece of code doesn't respond to any changing values, it sets the major and minor unit (which set the gridline spacing) to constant values. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Ant" wrote in message ... Hi. In a worksheet I have some code which automatically updates the Gridlines each time new source data is updated. It has been working fine however for some reason now, it updates whilst going through the code, but when a cell is chosen outside the graph eg cell A8, it resorts back to the original scale. Code as follows: With ActiveChart.Axes(xlValue) .MinimumScale = 0 .MaximumScale = 40000000 .MinorUnit = 200000 .MajorUnit = 5000000 .Crosses = xlAutomatic .ReversePlotOrder = False .ScaleType = xlLinear .DisplayUnit = xlNone End With Range("A8").Select Can anyone see what is going wrong here and why the gridlines don't stay on the scale above? Cheers. |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I cannot explain it either. Is there more code in a SelectionChange event
procedure which may affect the chart? - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Ant" wrote in message ... Yes, this is just an excerpt from the full code within the worksheet module. It does set the major and minor unit, however when the macro has finished the gridlines revert back to the previous scale. When I step through the code line by line, I can actually see the gridlines changing to what the code specifies, however once it steps out of the graph (ie to cell A8) the scale changes back to the old scale....which I cannot explain. "Jon Peltier" wrote: Where is the code? In the worksheet module? This piece of code doesn't respond to any changing values, it sets the major and minor unit (which set the gridline spacing) to constant values. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Ant" wrote in message ... Hi. In a worksheet I have some code which automatically updates the Gridlines each time new source data is updated. It has been working fine however for some reason now, it updates whilst going through the code, but when a cell is chosen outside the graph eg cell A8, it resorts back to the original scale. Code as follows: With ActiveChart.Axes(xlValue) .MinimumScale = 0 .MaximumScale = 40000000 .MinorUnit = 200000 .MajorUnit = 5000000 .Crosses = xlAutomatic .ReversePlotOrder = False .ScaleType = xlLinear .DisplayUnit = xlNone End With Range("A8").Select Can anyone see what is going wrong here and why the gridlines don't stay on the scale above? Cheers. |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Perhaps it is just "one of those things". I actually have 2 graphs which
update at the same time (well, one after eachother that is). One works fine but the other reverts to the original data each time once the code comes out of the graph. The only way to change the scale is to manually click in and do it. Those changes then become the scale it keeps reverting back to. So, strangely enough graph 1 is dynamic but graph 2 is not. Funny thing is it was working fine one day and then not the next. It's quite simple code and I do not have a SelectionChange event. It may be a case of re-writing the code from scratch. "Jon Peltier" wrote: I cannot explain it either. Is there more code in a SelectionChange event procedure which may affect the chart? - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Ant" wrote in message ... Yes, this is just an excerpt from the full code within the worksheet module. It does set the major and minor unit, however when the macro has finished the gridlines revert back to the previous scale. When I step through the code line by line, I can actually see the gridlines changing to what the code specifies, however once it steps out of the graph (ie to cell A8) the scale changes back to the old scale....which I cannot explain. "Jon Peltier" wrote: Where is the code? In the worksheet module? This piece of code doesn't respond to any changing values, it sets the major and minor unit (which set the gridline spacing) to constant values. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Ant" wrote in message ... Hi. In a worksheet I have some code which automatically updates the Gridlines each time new source data is updated. It has been working fine however for some reason now, it updates whilst going through the code, but when a cell is chosen outside the graph eg cell A8, it resorts back to the original scale. Code as follows: With ActiveChart.Axes(xlValue) .MinimumScale = 0 .MaximumScale = 40000000 .MinorUnit = 200000 .MajorUnit = 5000000 .Crosses = xlAutomatic .ReversePlotOrder = False .ScaleType = xlLinear .DisplayUnit = xlNone End With Range("A8").Select Can anyone see what is going wrong here and why the gridlines don't stay on the scale above? Cheers. |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
There must be more code that you didn't post. Maybe it would help to see it
all. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Ant" wrote in message ... Perhaps it is just "one of those things". I actually have 2 graphs which update at the same time (well, one after eachother that is). One works fine but the other reverts to the original data each time once the code comes out of the graph. The only way to change the scale is to manually click in and do it. Those changes then become the scale it keeps reverting back to. So, strangely enough graph 1 is dynamic but graph 2 is not. Funny thing is it was working fine one day and then not the next. It's quite simple code and I do not have a SelectionChange event. It may be a case of re-writing the code from scratch. "Jon Peltier" wrote: I cannot explain it either. Is there more code in a SelectionChange event procedure which may affect the chart? - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Ant" wrote in message ... Yes, this is just an excerpt from the full code within the worksheet module. It does set the major and minor unit, however when the macro has finished the gridlines revert back to the previous scale. When I step through the code line by line, I can actually see the gridlines changing to what the code specifies, however once it steps out of the graph (ie to cell A8) the scale changes back to the old scale....which I cannot explain. "Jon Peltier" wrote: Where is the code? In the worksheet module? This piece of code doesn't respond to any changing values, it sets the major and minor unit (which set the gridline spacing) to constant values. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Ant" wrote in message ... Hi. In a worksheet I have some code which automatically updates the Gridlines each time new source data is updated. It has been working fine however for some reason now, it updates whilst going through the code, but when a cell is chosen outside the graph eg cell A8, it resorts back to the original scale. Code as follows: With ActiveChart.Axes(xlValue) .MinimumScale = 0 .MaximumScale = 40000000 .MinorUnit = 200000 .MajorUnit = 5000000 .Crosses = xlAutomatic .ReversePlotOrder = False .ScaleType = xlLinear .DisplayUnit = xlNone End With Range("A8").Select Can anyone see what is going wrong here and why the gridlines don't stay on the scale above? Cheers. |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Jon hope you can help. I have data which feeds in to a simple chart. data is
added each day and i want the chart to update with the new data. The problem i have is if i extend the date range to include future values i add the graph looks messy. This is because the graph plots cumm totals so for eg the current cumm value up to 16th Mar is 2544 if i extend the range up to say 31 dec then i have 2544 values upto dec 31st waiting for new values to be added. So currently i have to manually change the date range to include the current last row which is a bit clumsy. Do you have a simple solution to this thank you -- thank you censura "Jon Peltier" wrote: Where is the code? In the worksheet module? This piece of code doesn't respond to any changing values, it sets the major and minor unit (which set the gridline spacing) to constant values. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Ant" wrote in message ... Hi. In a worksheet I have some code which automatically updates the Gridlines each time new source data is updated. It has been working fine however for some reason now, it updates whilst going through the code, but when a cell is chosen outside the graph eg cell A8, it resorts back to the original scale. Code as follows: With ActiveChart.Axes(xlValue) .MinimumScale = 0 .MaximumScale = 40000000 .MinorUnit = 200000 .MajorUnit = 5000000 .Crosses = xlAutomatic .ReversePlotOrder = False .ScaleType = xlLinear .DisplayUnit = xlNone End With Range("A8").Select Can anyone see what is going wrong here and why the gridlines don't stay on the scale above? Cheers. |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Dynamic Charts:
http://peltiertech.com/Excel/Charts/...umnChart1.html http://peltiertech.com/Excel/Charts/Dynamics.html - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "censura" wrote in message ... Jon hope you can help. I have data which feeds in to a simple chart. data is added each day and i want the chart to update with the new data. The problem i have is if i extend the date range to include future values i add the graph looks messy. This is because the graph plots cumm totals so for eg the current cumm value up to 16th Mar is 2544 if i extend the range up to say 31 dec then i have 2544 values upto dec 31st waiting for new values to be added. So currently i have to manually change the date range to include the current last row which is a bit clumsy. Do you have a simple solution to this thank you -- thank you censura "Jon Peltier" wrote: Where is the code? In the worksheet module? This piece of code doesn't respond to any changing values, it sets the major and minor unit (which set the gridline spacing) to constant values. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Ant" wrote in message ... Hi. In a worksheet I have some code which automatically updates the Gridlines each time new source data is updated. It has been working fine however for some reason now, it updates whilst going through the code, but when a cell is chosen outside the graph eg cell A8, it resorts back to the original scale. Code as follows: With ActiveChart.Axes(xlValue) .MinimumScale = 0 .MaximumScale = 40000000 .MinorUnit = 200000 .MajorUnit = 5000000 .Crosses = xlAutomatic .ReversePlotOrder = False .ScaleType = xlLinear .DisplayUnit = xlNone End With Range("A8").Select Can anyone see what is going wrong here and why the gridlines don't stay on the scale above? Cheers. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel graphs won't update | Charts and Charting in Excel | |||
Pasting Graphs - making me crazy! | Excel Discussion (Misc queries) | |||
HYPERLINK GRAPHS | Charts and Charting in Excel | |||
Are there better GRAPHS within EXCEL or Add-on graphs? | Charts and Charting in Excel | |||
Copying Charts and graphs to another worksheet with formulas | Excel Worksheet Functions |