Hi,
I have an excel with a chart in it.
I would like to change the Y scale of the chart from logarithmic to linear and vise versa according to 2radio buttons I have in the same sheet.
is it possible? if yes, how? if not, maybe you have any other idea how to change it user friendly?
xsl attached.
thanks.
Last edited by michael.g; 11-07-2009 at 04:12 PM.
Inset these 2 macros into a module and assign them to your radio buttons.
These will allow you to switch between Log and Linear Scales
Code:Sub Log() ActiveSheet.ChartObjects("Chart 1").Activate ActiveChart.Axes(xlValue).Select With ActiveChart.Axes(xlValue) .MinimumScaleIsAuto = True .MaximumScaleIsAuto = True .MinorUnitIsAuto = True .MajorUnitIsAuto = True .Crosses = xlAutomatic .ReversePlotOrder = False .ScaleType = xlLogarithmic .DisplayUnit = xlNone End With End SubCode:Sub lin() With ActiveChart.Axes(xlValue) .MinimumScaleIsAuto = True .MaximumScaleIsAuto = True .MinorUnitIsAuto = True .MajorUnitIsAuto = True .Crosses = xlAutomatic .ReversePlotOrder = False .ScaleType = xlLinear .DisplayUnit = xlNone End With End Sub
Last edited by jj72uk; 11-05-2009 at 01:01 PM.
Thanks!!!!!!!!!!!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks