Macro to set header
Hi there,
Mabye you could make use of something like this ...
sub SetAllHeaders()
dim ws as worksheet
for each ws in thisworkbook.worksheets '*
ws.pagesetup.centerheader = ws.name
next ws
end sub
I'm guessing that you don't need any special formats of any kind for this
and you want it in the center.
*Assumes you ARE inserting this code into the workbook in which you will
perform the code. If not, change "thisworkbook" with "activeworkbook" and
ensure the code is run on the workbook that is active (the desired
workbook).
--
Regards,
Zack Barresse, aka firefytr
"FGOMEZ" wrote in message
...
I have a file with about 50 different sheets (Names),
I want to print them all, and need to have a header for every sheet, which
is the same name of the TAB, could somebody help me to get a macro to set
the header automatically on every sheet.
Thanks in advance for your help
|