Protect Footer on Worksheet

  • Thread starter Thread starter ExcelMonkey
  • Start date Start date
E

ExcelMonkey

I want to be able to protect only the footer on an excel
worksheet. Is it possible to do this without protecting
the workbook?

Effectively I want to put a disclaimer in the footer and
ensure that it does not get deleted.

If there is not a way, is there another way to put the
disclaimer in (i.e. a watermark on the sheet),

Thanks
 
I don't think that protection will help, either.

I've found that the only way I could insure that the header/footers were what I
wanted them to be was to use a macro that set them right before I printed.

If you record a macro that sets the header/footer the way you want, you can put
that code in the ThisWorkbook module. But the event you'll want to use is the
workbook_beforeprint event.

All this breaks if the user has disabled macros or disabled events.

If you need help modifying your code, post back and I'm sure someone will
respond.
 
Put the text in beforprint event code and protect the VBE project.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftFooter = "Everything here is my opinion and I acceptr no
liability"
End With
End Sub

Not foolproof, but not bad.
 
Just an added thought:
Now copy the data or the sheet to another workbook and print it with
whatever footer you desire.
 
Tom Ogilvy wrote...
Just an added thought:
Now copy the data or the sheet to another workbook and print it with
whatever footer you desire.
....

If you really want to prevent users from doing certain things, you
gotta think nasty, something for which I'm better qualified than most
of the rest of you.

If macros are needed to ensure a workbook works properly, then include
do-nothing udfs returning VBA Empty variant values (equivalent to
what's returned by blank worksheet cells), and include them in *EVERY*
formula. If macros are disabled, so are udfs, in which case *ALL*
formulas would return #NAME?. If users want to print useless pages
filled with #NAME? errors with their own custom headers and footers, I
say let 'em until they blow through their paper and toner budgets.

So, when the only way to get useful results requires macros enabled,
then you can rely on event handlers. To prevent copying and pasting,
add code to the event handlers to make it difficult (though still not
impossible).

Note that even if copying from given workbooks were disabled, it'd
still be possible to pull data from such workbooks using external
reference links, e.g.,

='X:\Extremely\High\Security\[Document.xls]Well Protected'!A1

Basic rule of spreadsheet IP: if the file can be opened, *ANYTHING* in
it can be misused. Corollary: no spreadsheet, especially not Excel,
provides effective IP protection, so if you want to protect IP, don't
put it in a spreadsheet.
 
Back
Top