View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Nasir[_2_] Nasir[_2_] is offline
external usenet poster
 
Posts: 9
Default Macro to run on all files in a folder but exclude sheets withPivot Table, Pivot Charts and Charts

On Mar 6, 5:15*am, "Clif McIrvin" wrote:
"Clif McIrvin" wrote in message

...

I just took another look at your recorded macro and I'm not certain it
was doing what you want as you posted it. Replace what I posted with
this:

Option Explicit

Sub FormatWorksheet(sh As Worksheet)
'
* * With sh.Cells.Font
* * * * .Name = "Trebuchet MS"
* * * * .Size = 11
* * * * .Strikethrough = False
* * * * .Superscript = False
* * * * .Subscript = False
* * * * .OutlineFont = False
* * * * .Shadow = False
* * * * .Underline = xlUnderlineStyleNone
* * * * .ThemeColor = xlThemeColorLight1
* * * * .TintAndShade = 0
* * * * .ThemeFont = xlThemeFontNone
* * End With

* * With sh.Rows("1:1")
* * * * .Font.Bold = True
* * * * With .Cells.Interior
* * * * * .Pattern = xlSolid
* * * * * .PatternColorIndex = xlAutomatic
* * * * * .Color = 65535
* * * * * .TintAndShade = 0
* * * * * .PatternTintAndShade = 0
* * * * End With
* * End With

* * sh.Cells.EntireColumn.AutoFit
* * sh.Range("A1").Select

End Sub

--
Clif McIrvin

(clare reads his mail with moe, nomail feeds the bit bucket :-)


I cannot make it work
There are three differenct macros now..
I wanted to have one macro for my purpose..pardon my ignorance please

Nasir