Hi There,
I have the following sub that is causing me problems - when an error occurs it behaves as expected but when an error doesn't occur it still triggers the error handler - Any ideas ????
Private Sub btnConfirm_Click()
On Error GoTo ErrHandler
ActiveSheet.ChartObjects("Chart 1"
.Activate
With ActiveChart.Axes(xlValue, xlSecondary)
.MinimumScale = fmAxisBox.Min.Value
.MaximumScale = fmAxisBox.Max.Value
End With
fmAxisBox.Min.Value = ""
fmAxisBox.Max.Value = ""
Sheets("Charts"
.Axis2_Scale.Value = False
fmAxisBox.Hide
Close_ActiveChart
ErrHandler:
fmAxisBox.Min.Value = ""
fmAxisBox.Max.Value = ""
fmAxisBox.Hide
MsgBox " Unable to set the Second Axis Parameters Specified", vbCritical, "Error on Secondary Axis"
Sheets("Charts"
.Axis2_Scale.Value = False
Close_ActiveChart
On Error GoTo 0
End Sub
I have the following sub that is causing me problems - when an error occurs it behaves as expected but when an error doesn't occur it still triggers the error handler - Any ideas ????
Private Sub btnConfirm_Click()
On Error GoTo ErrHandler
ActiveSheet.ChartObjects("Chart 1"
With ActiveChart.Axes(xlValue, xlSecondary)
.MinimumScale = fmAxisBox.Min.Value
.MaximumScale = fmAxisBox.Max.Value
End With
fmAxisBox.Min.Value = ""
fmAxisBox.Max.Value = ""
Sheets("Charts"
fmAxisBox.Hide
Close_ActiveChart
ErrHandler:
fmAxisBox.Min.Value = ""
fmAxisBox.Max.Value = ""
fmAxisBox.Hide
MsgBox " Unable to set the Second Axis Parameters Specified", vbCritical, "Error on Secondary Axis"
Sheets("Charts"
Close_ActiveChart
On Error GoTo 0
End Sub