Hi, i am using charts in excel that display simple data. I want the chart to be able to recognise what the maximum value is, and only display a scale upto that value.

i cam across the following code

Code:
ActiveChart.Axes(xlValue).Select 
With ActiveChart.Axes(xlValue) 
    .MinimumScale =  Range("Min").Value 
    .MaximumScale = Range("Max").Value 
End With
but do not understand how to use it.

any help will be much appreciated.
Thanks