View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default protection of headers and footers

You can place the footer info in a locked cell and use BeforePrint macro to use
that info in the footer.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet
.PageSetup.CenterFooter = .Range("A1").Value
End With
End Sub


Gord Dibben MS Excel MVP

On Wed, 2 May 2007 08:38:02 -0700, kw wrote:

thanks.

since there's not an easy fix, i think next time i update the forms, i'll
just put the control info in a cell as opposed to the footer... then lock
the cell.


"JE McGimpsey" wrote:

First, XL is not a stable platform for controlled forms unless your
users respect the protection you apply (it's a trivial exercise for
anyone who's able to find these groups, to remove cell protection). So
the first way is to tell your staff to leave the headers and footers
alone. And make sure they're generating the forms from a read-only
template rather than working on the original (of course, they're
probably just copying their last saved workbook).

Short of removing the Header and Footer and Page Setup options from
their menus, one way I've implemented before is to include
Workbook_BeforePrint() and Workbook_BeforeSave event macros that set the
headers (usually after validating the form).





In article ,
kw wrote:

At work, we use excell to make controlled forms. We often put form numbers
and revision levels in the footer. I know how to control cells in a
spreadsheet, but how do I protect the header and footer?