ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Protecting Headers and Footers!! (https://www.excelbanter.com/excel-discussion-misc-queries/189802-protecting-headers-footers.html)

Raja

Protecting Headers and Footers!!
 
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?



Mike H

Protecting Headers and Footers!!
 
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
"Raja" wrote:

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?



Dave Peterson

Protecting Headers and Footers!!
 
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.

Raja wrote:

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?


--

Dave Peterson


All times are GMT +1. The time now is 03:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com