Hi, I have a small sub for (un)rounding the corners of selected charts... But if no chart is selected the procedure shows an error message (91). The Err.Number = 91 won't catch up the error. Is there any other way to test if a chart (object) is selected, so i can get a Message "No chart selected". Thanks
Code:
Sub zaobli_graf()
Dim cbo As ChartObject
Dim cht As Chart
Dim menoGrafu As String
menoGrafu = ActiveChart.Parent.Name
Set cbo = ActiveSheet.ChartObjects(menoGrafu)
Set cht = cbo.Chart
cbo.RoundedCorners = cbo.RoundedCorners = False
End Sub