Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm creating a chart with two data series using vba. One data series is on the primary axis and one is on the secondary axis. In order for the chart to look correct, the two axis need to have the same max/mins. I have written code that does just this. Below is a portion of code from a much larger routine.
With ActiveChart.Axes(xlValue, xlSecondary) .MinimumScale = ActiveChart.Axes(xlValue, xlPrimary).MinimumScale .MaximumScale = ActiveChart.Axes(xlValue, xlPrimary).MaximumScale End With In my testing I'm using a chart with primary axis max=60, min=-30. The code always works for the maximum value. It also works perfectly for the min if I put a breakpoint in the code before "MinimumScale = ActiveChart....". However, if the code is called from Excel and runs freely (no breakpoints), or if the first breakpoint is after "MinimumScale = ActiveChart...", then VBA somehow concludes that the min=-40. I'm finding this absolutely maddening. Does anyone know how to get Excel/VBA to work correctly? Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code stops for one user, like it has a breakpoint | Excel Programming | |||
Setting timer to run macro at regular intervals | Excel Programming | |||
Setting timer to run macro at regular intervals | Excel Programming | |||
need breakpoint to stop code | Excel Programming | |||
Ignore breakpoint when running a macro | Excel Programming |