G
Guest
I am using excel 2000
i use the following code to delete all the shape in a document
newBook.Worksheets(nameofsheet).Select
newBook.Worksheets(nameofsheet).Shapes.SelectAll
Selection.ShapeRange.Delete
It works fine with most document
but in two cases, there is an out of memory error at shapes.selectALL
but i think there is plenty of memory
could anyone tell me what is the cause and how to fix this?
i use the following code to delete all the shape in a document
newBook.Worksheets(nameofsheet).Select
newBook.Worksheets(nameofsheet).Shapes.SelectAll
Selection.ShapeRange.Delete
It works fine with most document
but in two cases, there is an out of memory error at shapes.selectALL
but i think there is plenty of memory
could anyone tell me what is the cause and how to fix this?