Thread: VBA overflow
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default VBA overflow

Shapes doesn't have a delete method. What you can do is

ActiveSheet.Shapes.SelectAll
Selection.Delete

--
Regards,
Tom Ogilvy


"Christof" wrote in
message ...
Chaps,

I have a macro which calls a function to delete all
shapes on a worksheet.
If that sheet holds many shapes (100+), then the code
crashes while deleting the shapes: (memory at ... could
not be read)

I've tried many implementations to delete these shapes
(deleteAll, for each, ...) but I always end up in the
same situation

Can somebody give me the best way to avoid this problem?

thanks