Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Protect HEADER and FOOTER ?

Although I've protected the worksheet, users can still edit the HEADER and
FOOTER.

Is there code or any other way of protecting the HEADER and FOOTER from
being edited ?

Thanks very much for your help.

AP


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Protect HEADER and FOOTER ?

AP,
As far as I can tell, protection (in XL2K) does not cover the header/footer.
But you could respond in the Workbook_BeforePrint event to set them to
whatever you want.
This events fires on PrintPreview as well as actual printing, so an
incorrect header/footer would never actually be seen.

NickHK

"AP" wrote in message
...
Although I've protected the worksheet, users can still edit the HEADER and
FOOTER.

Is there code or any other way of protecting the HEADER and FOOTER from
being edited ?

Thanks very much for your help.

AP




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Protect HEADER and FOOTER ?

Nick,

Thanks for the response. What I find is that in the print preview mode, the
user can click on "Print..." and manually change the headers and footers
(despite the Workbook_BeforePrint event subroutine) and then print exactly
the changed header/footer without the subroutine having the chance to
interfere further.

Any ideas on how this might be overcome?

Thanks,
AP

"NickHK" wrote in message
...
AP,
As far as I can tell, protection (in XL2K) does not cover the
header/footer.
But you could respond in the Workbook_BeforePrint event to set them to
whatever you want.
This events fires on PrintPreview as well as actual printing, so an
incorrect header/footer would never actually be seen.

NickHK

"AP" wrote in message
...
Although I've protected the worksheet, users can still edit the HEADER
and
FOOTER.

Is there code or any other way of protecting the HEADER and FOOTER from
being edited ?

Thanks very much for your help.

AP






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Protect HEADER and FOOTER ?

AP,
This works for me for Print Preview and then Print:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
MsgBox "Before print event fired"

With ActiveSheet.PageSetup
.LeftHeader = "Only this text allowed."
'And anything further
End With
End Sub

NickHK

P.S. It's probably a good idea to set your print to a PDF or similar, so you
do print page after page of rubbish whilst testing this.


"AP" wrote in message
...
Nick,

Thanks for the response. What I find is that in the print preview mode,

the
user can click on "Print..." and manually change the headers and footers
(despite the Workbook_BeforePrint event subroutine) and then print exactly
the changed header/footer without the subroutine having the chance to
interfere further.

Any ideas on how this might be overcome?

Thanks,
AP

"NickHK" wrote in message
...
AP,
As far as I can tell, protection (in XL2K) does not cover the
header/footer.
But you could respond in the Workbook_BeforePrint event to set them to
whatever you want.
This events fires on PrintPreview as well as actual printing, so an
incorrect header/footer would never actually be seen.

NickHK

"AP" wrote in message
...
Although I've protected the worksheet, users can still edit the HEADER
and
FOOTER.

Is there code or any other way of protecting the HEADER and FOOTER from
being edited ?

Thanks very much for your help.

AP








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Header and Footer Té Excel Discussion (Misc queries) 3 August 6th 09 03:57 PM
Header/Footer VirginiaKim Excel Discussion (Misc queries) 2 June 20th 08 09:21 PM
how to protect header & footer François Excel Programming 3 July 19th 05 05:38 PM
header or footer ParTeeGolfer Excel Worksheet Functions 4 January 9th 05 07:33 PM
Changing (Part of) Header Without Changing Footer or Rest of Header Paul Cross Excel Programming 3 May 20th 04 10:42 PM


All times are GMT +1. The time now is 05:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"