PDA

View Full Version : If there is no chart on activesheet, then go to NoChart.



clarksonneo
09-12-2011, 11:15 AM
Hi,

I want a macro that has this function:
If there is no chart on activesheet, then go to NoChart.

However, my code does not work


If ActiveSheet.ChartObjects Is Nothing Then
GoTo NoChart
End If
...
...
NoChart:



Could you please amend my macro so that it bcomes work?

Thanks

xld
09-12-2011, 11:21 AM
Try


If ActiveSheet.ChartObjects.Count = 0 Then