Protecting Headers and Footers!!

R

Raja

When I protect the worksheet it does protect most of the formatting and
inserting and deleting rows and columns.

I want to protect my workseet in such a way that user cannot go to View >
Headers / Footers or File Page set up and change the Headers and Footers!!

Is it possible? how do I do this setting?
 
M

Mike H

Hi,

A bit drastic maybe but you could do this, You would need to re-enable it at
some point; probably workbook close by changing False to True. This does
however depend on macros being enabled which may not be the case.

Private Sub Workbook_Open()
With Application.CommandBars("Worksheet Menu Bar")
With .Controls("&View")
.Controls("&Header and Footer...").Enabled = False
End With
End With
End Sub


Mike
 
D

Dave Peterson

I don't think you can protect this.

If it's really important, you could put code into the workbook_Beforeprint event
that makes sure the headers/footers are what you want.

But that would fail if the user disabled macros or even disabled events.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top