LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Window Error when deleting shapes

i am suing excel 2000 vba and win 2000 platform
I use the following code to delete all shapes in a worksheet

Do While Book.Worksheets(nameofsheet).Shapes.Count
Book.Worksheets(nameofsheet).Shapes(Book.Worksheet s(nameofsheet).Shapes.Count).Delete
Loop

Sometimes the excel tell that a windows error and the process is terminated
during the middle. I do the similar operation with other sheets, there is no
error.
Somtimes the process can run successfully. The error is by chance.

I have tried to use a more powerful machine with same platform to test it.
It stilll have such error by chance.

What can i do to avoid the error, or how can this delete shape method be
improved?

Thank you!
 
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
Deleting Shapes aftamath Excel Discussion (Misc queries) 5 November 5th 05 12:37 AM
Deleting shapes in an area Tim Excel Programming 2 October 27th 04 08:51 PM
Deleting shapes Dr.Schwartz Excel Programming 1 October 15th 04 10:18 AM
Deleting shapes Steve Excel Programming 4 June 16th 04 05:23 PM
Deleting shapes crashes for me. (Excel 97 vba) Excel Question Excel Programming 0 October 23rd 03 02:30 AM


All times are GMT +1. The time now is 03:41 PM.

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

About Us

"It's about Microsoft Excel"