jmenche
06-02-2011, 06:56 AM
Howdy,
I am looping through all worksheets in a file and for some reason cannot turn the dotted print area lines off. I recorded a macro and replicated it in my routine and it still doesn't work. Here's what I've got so far:
Dim ws as worksheet
for each ws in activeworkbook.worksheets
ws.activate
'bunch of other stuff
with ws.pagesetup
.printarea = ""
.fittopagestall = 1
.fittopageswide = 1
end with
next
After I run my main macro, I still have to select all of my worksheets and do the pagesetup thingy.
Anyone know what i'm doing wrong?
:beerchug:
I am looping through all worksheets in a file and for some reason cannot turn the dotted print area lines off. I recorded a macro and replicated it in my routine and it still doesn't work. Here's what I've got so far:
Dim ws as worksheet
for each ws in activeworkbook.worksheets
ws.activate
'bunch of other stuff
with ws.pagesetup
.printarea = ""
.fittopagestall = 1
.fittopageswide = 1
end with
next
After I run my main macro, I still have to select all of my worksheets and do the pagesetup thingy.
Anyone know what i'm doing wrong?
:beerchug: