Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 12-01-2020, 09:02 PM
Guessed's Avatar
Guessed Guessed is offline Help with Shape Deletion on Selection only Windows 10 Help with Shape Deletion on Selection only Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,185
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Your ActiveDocument.Select line is selecting everything so any subsequent code would apply to the whole document. Perhaps you are looking for something along the following lines.
Code:
Sub DeleteShapes()
  Do While Selection.Range.ShapeRange.Count > 0
    Selection.Range.ShapeRange(1).Delete
  Loop
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 

Tags
delete shape on selection



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shape Data - Using Fixed List selection in another cell's formula natelfo Visio 1 04-22-2019 01:20 PM
How to change size / shape of a shape in a stencil tomgoodell Visio 1 06-30-2016 04:40 AM
Help with Shape Deletion on Selection only Draw a selection box over a shape omberlo PowerPoint 1 11-25-2012 06:44 AM
Tip on File Deletion zyzzyva57 Office 0 01-30-2010 05:33 AM
IMAP Deletion MaxRabbit Outlook 6 10-20-2008 06:33 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:59 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft