#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 84
Default Delete object code

Hi

I have the following code:
ActiveSheet.DrawingObjects.Select
Selection.Delete

However, if there are no objects to delete the code deletes the cell
currently in focus. Is there any code that I can put in that if objects are
found to select that it won't then delete anything...?

Thanks in advance.
--
Marie Bayes
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 84
Default Delete object code

Sorry, have solved it with an if statement, hope no-one's spent any time on
this one.
--
Marie Bayes


"Marie Bayes" wrote:

Hi

I have the following code:
ActiveSheet.DrawingObjects.Select
Selection.Delete

However, if there are no objects to delete the code deletes the cell
currently in focus. Is there any code that I can put in that if objects are
found to select that it won't then delete anything...?

Thanks in advance.
--
Marie Bayes

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
Delete code chrisnsmith Excel Discussion (Misc queries) 4 March 8th 09 01:10 AM
delete code keeps going and coing Wanna Learn Excel Discussion (Misc queries) 5 September 2nd 08 11:02 PM
Chart Object VB Code MS[_2_] Charts and Charting in Excel 2 March 6th 07 11:41 AM
code to delete rows ianalexh Excel Discussion (Misc queries) 5 May 5th 05 10:46 AM
Cannot delete object TVFTH Excel Discussion (Misc queries) 2 March 25th 05 02:15 AM


All times are GMT +1. The time now is 12:46 PM.

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"