Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default VBA overflow

does this help?

Sub ShapesCut()
For Each s In ActiveSheet.Shapes
s.Cut
Next
End Sub

"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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA overflow

Thanks a lot: yes it helps

I won't even try to understand why this does work and
exactly the same with s.delete doesn't, but it's surely
bizar.

Christof


-----Original Message-----
does this help?

Sub ShapesCut()
For Each s In ActiveSheet.Shapes
s.Cut
Next
End Sub

"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



.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default VBA overflow

right click a shape and see if "delete" is a choice

"Christof" <me@me wrote in message
...
Thanks a lot: yes it helps

I won't even try to understand why this does work and
exactly the same with s.delete doesn't, but it's surely
bizar.

Christof


-----Original Message-----
does this help?

Sub ShapesCut()
For Each s In ActiveSheet.Shapes
s.Cut
Next
End Sub

"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



.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is format overflow? Chantele New Users to Excel 2 March 4th 09 04:51 PM
Overflow error.. why? Fingerjob Excel Discussion (Misc queries) 4 November 13th 06 05:18 PM
Data overflow to second worksheet jv Excel Worksheet Functions 0 March 30th 06 06:06 PM
allow text to overflow into the next cell? gbwoodman Excel Discussion (Misc queries) 1 February 7th 06 12:42 PM
Overflow Error DG Excel Discussion (Misc queries) 3 April 15th 05 05:45 PM


All times are GMT +1. The time now is 02:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"