Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Deleting Contents of Sheets

I have a routine which deletes all the contents of a
sheet. Clear All only takes out the text, and
formatting. How do I also get rid of any charts, buttons
or other objects? Without deleting the sheet, I need to
make the sheet completely empty.


THanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default Deleting Contents of Sheets

Hi
Dim Obj
For Each Obj In ActiveSheet.Shapes
Obj.Delete
Next Obj

HTH
Cordially
Pascal

"ExcelMonkey" a écrit dans le message
de ...
I have a routine which deletes all the contents of a
sheet. Clear All only takes out the text, and
formatting. How do I also get rid of any charts, buttons
or other objects? Without deleting the sheet, I need to
make the sheet completely empty.


THanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Deleting Contents of Sheets

Be careful with this, it also deletes the data validation and autofilter
dropdown arrows if those facilities are currently in use. Worst thing is
that no-one seems to know how to get them back for that sheet.

See this discussion between Dave Peterson and myself on the problem and a
solution http://tinyurl.com/3lgq5.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"papou" wrote in message
...
Hi
Dim Obj
For Each Obj In ActiveSheet.Shapes
Obj.Delete
Next Obj

HTH
Cordially
Pascal

"ExcelMonkey" a écrit dans le

message
de ...
I have a routine which deletes all the contents of a
sheet. Clear All only takes out the text, and
formatting. How do I also get rid of any charts, buttons
or other objects? Without deleting the sheet, I need to
make the sheet completely empty.


THanks





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
How can I delete the contents of a cell without deleting the formu 6js59 Excel Discussion (Misc queries) 0 June 3rd 08 07:01 PM
Keep sheet from deleting contents Richard Excel Worksheet Functions 1 March 14th 08 03:24 AM
Retaining formula after deleting contents. SiH23 Excel Discussion (Misc queries) 3 January 7th 08 06:36 PM
alert before deleting contents of a cell Mortgage Man Excel Discussion (Misc queries) 3 December 15th 06 04:30 PM
Deleting contents of cells in non contiguous ranges Richard Buttrey Excel Worksheet Functions 9 April 1st 06 11:46 PM


All times are GMT +1. The time now is 11:44 AM.

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"