Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Header and Footer | Excel Discussion (Misc queries) | |||
Header/Footer | Excel Discussion (Misc queries) | |||
how to protect header & footer | Excel Programming | |||
header or footer | Excel Worksheet Functions | |||
Changing (Part of) Header Without Changing Footer or Rest of Header | Excel Programming |