Macro to run on all files in a folder but exclude sheets with Pivot Table, Pivot Charts and Charts
"Nasir" wrote in message
...
On Mar 8, 3:42 am, "Clif McIrvin" wrote:
"Nasir" wrote in message
[...]
Hi Clif
Thanks for your help
I changed the lines as per your instructions.
When I run the Private Sub ScanWorkbooks
I get Runtime error 1004 in Sub FormatWorksheet
“Select method of Range class failed”
sh.Range("A2").Select <<< this line is highlighted
Can you guide me please?
-----------
That's the last line of FormatWorksheet, isn't it? So it appears that
everything else is doing what you need.
Try changing that line to
sh.Range("A2").Activate
and see if that works. If that doesn't fix it post back.
--
Clif McIrvin
(clare reads his mail with moe, nomail feeds the bit bucket :-)
|