Select

P

Pedro

Hi
I have the following code:
ActiveSheet.Shapes("SectorSplit").Select
Selection.Delete

What code should I add in order that if the Shape does not exist it goes to
line2

Best Regards,
Pedro
 
J

J.E. McGimpsey

One way:

On Error Resume Next
ActiveSheet.Shapes("SectorSplit").Delete
On Error GoTo 0

Goto 0 resets the error handler to the default.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top