Delete hundreds thousands of objects

dandelion

New Member
Joined
Jul 16, 2022
Messages
33
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hi,

I have a file that include hundreds thousands of objects. I have tried 02 ways to delete them but the excel freeze
1. Go to Special --> select Object --> click Delete --> excel Freeze
2. Show Selection Panel --> select some Objects --> excel Freeze before I want to delete.

Anyone can help? TIA
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
It sounds like you have too many object to select and freeze all at once.

I cannot imagine a workbook with that many objects!
To me, that is a big red flag that you may not be using the right tools for the job at hand.
I cannot imagine it is a very effecient workbook. Is it pretty slow/cumbersome?
 
Upvote 0
If you want to delete them all you can try using a single line of code that you enter in the Immediate Window of the Visual Basic Editor. For example, first open your Visual Basic Editor using F11, then bring up the Immediate Window using Ctrl+G, if it's not already showing, and then make sure that the sheet containing your objects is the active sheet and enter the following line in the Immediate Window and press ENTER...

VBA Code:
ActiveSheet.DrawingObjects.Delete

Hope this helps!
 
Last edited:
Upvote 0
Solution
If you want to delete them all you can try using a single line of code that you enter in the Immediate Window of the Visual Basic Editor. For example, first open your Visual Basic Editor using F11, then bring up the Immediate Window using Ctrl+G, if it's not already showing, and then make sure that the sheet containing your objects is the active sheet and enter the following line in the Immediate Window and press ENTER...

VBA Code:
ActiveSheet.DrawingObjects.Delete

Hope this helps!
Perfect!
 
Upvote 0

Forum statistics

Threads
1,214,942
Messages
6,122,367
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top