Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default Clear all including objects without deleting sheets

I thank all of you for the help. The replies were great!

"Gord Dibben" wrote:

Sub clear_objects()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
If ws.Tab.ColorIndex = xlNone Then
With ws
.DrawingObjects.Delete
.Cells.Clear
End With
End If
Next ws
End Sub


Gord Dibben MS Excel MVP

On Thu, 15 Apr 2010 10:29:02 -0700, Curt
wrote:

I would like a macro that uses the "EDIT" - "CLEAR ALL" command for all
sheets that do not have colored tabs. I would also like it to remove all
charts, objects, images, etc. for all sheets that do not have colored tabs.

Currently, I can only remove all objects by manually deleting each object
one at a time. Deleting the sheets is not an option because that results in
cell refrences for me as I refrence cells in the sheets that I am trying to
clear.

Any help is greatly appreciated!

Curt J


.

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
Clear all including objects without deleting sheets Chip Pearson Excel Programming 0 April 15th 10 09:13 PM
Clear all including objects without deleting sheets Chip Pearson Excel Programming 0 April 15th 10 09:11 PM
Copy Excel Chart (including drawn objects) into Word MarkN Charts and Charting in Excel 3 February 13th 06 02:09 PM
Including objects based on a condition RBeau Excel Worksheet Functions 2 December 19th 05 06:07 PM
Including control toolbox objects in tab order Dan Harris Excel Programming 0 August 13th 03 11:35 PM


All times are GMT +1. The time now is 12:34 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"