Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Clearing Rules from worksheests

I'm looking for a macro to clear rules from all my worksheets of a workbook.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,393
Default Clearing Rules from worksheests

What do you mean by "rules"
If you mean gridlines, there are two ways
1) In Tools | Options | you can uncheck the Gridlines box
OR
2) Use a fill (white will do) on all cells

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"John A" <John wrote in message
...
I'm looking for a macro to clear rules from all my worksheets of a
workbook.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Clearing Rules from worksheests

Sub grdlns()
For i = 1 To ThisWorkbook.Sheets.Count
Sheets(i).Activate
ActiveWindow.DisplayGridlines = False
Next
End Sub

"John A" wrote:

I'm looking for a macro to clear rules from all my worksheets of a workbook.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Clearing Rules from worksheests

Are you running Excel 2007 and do you mean Conditional Formatting "Rules"?

If so, I probably can't help..........I don't use 2007.

A couple other responders interpreted "rules" to mean gridlines.

Just wanted to clarify what you're looking for.

In 2003 you could use a macro like this.

Assumes all sheets have some CF so no error checking.

Sub clear_CF()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Cells.SpecialCells(xlCellTypeAllFormatCondition s) _
.FormatConditions.Delete
Next ws
End Sub


Gord Dibben MS Excel MVP

On Wed, 5 Nov 2008 14:36:01 -0800, John A <John
wrote:

I'm looking for a macro to clear rules from all my worksheets of a workbook.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Clearing Rules from worksheests

I think we lost the OP on this one Gord. I interpreted his post like Bernard
since he said he wanted to clear all rules from all worksheets, it seemed he
meant gridlines. I didn't even think about CF criteria as rules.

"Gord Dibben" wrote:

Are you running Excel 2007 and do you mean Conditional Formatting "Rules"?

If so, I probably can't help..........I don't use 2007.

A couple other responders interpreted "rules" to mean gridlines.

Just wanted to clarify what you're looking for.

In 2003 you could use a macro like this.

Assumes all sheets have some CF so no error checking.

Sub clear_CF()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Cells.SpecialCells(xlCellTypeAllFormatCondition s) _
.FormatConditions.Delete
Next ws
End Sub


Gord Dibben MS Excel MVP

On Wed, 5 Nov 2008 14:36:01 -0800, John A <John
wrote:

I'm looking for a macro to clear rules from all my worksheets of a workbook.





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
Clearing cells without clearing formulas marsjune68 Excel Discussion (Misc queries) 2 April 10th 09 07:39 PM
IF STATEMENTS FOR THE FOLLOWING RULES paul[_17_] Excel Programming 3 July 28th 07 04:36 PM
how do I set up a validation rules with two data rules Trudy Excel Worksheet Functions 1 October 16th 06 05:42 AM
Creating Rules Dorn Excel Programming 2 May 2nd 06 03:28 PM
Validation rules Souris Excel Programming 3 August 19th 05 08:09 PM


All times are GMT +1. The time now is 08:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"