Lock Excel 2010 Headers and Footers in Protected Worksheet

Hi,
Is there any way to lock Excel 2010 Headers and Footers in a Protected Worksheet?
Thank You!

Hi,
Here is one way to 'lock' the header and footer control, by disabling it in the WorkBook_Open event.
You indicate that the workbook is 'macro enabled', so if you are well versed in VBA please forgive the following
step by step 'how to'.
Copy the following code to the clipboard:
Private Sub Workbook_Open()
Application.CommandBars("Worksheet menu bar"). _
Controls("View").Controls("&Header and Footer...").Enabled = False
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("Worksheet menu bar"). _
Controls("View").Controls("&Header and Footer...").Enabled = True
End Sub
Press ALT + F11
Double click 'THIS WORKBOOK' in the Microsoft Excel Objects in the upper left quadrant.
Paste both event handlers into the WorkBook module editing area to the right.
Close the VBE and return to the worksheet.
Save the workbook.
Now, whenever the workbook is opened, the Header and Footer option under the View tab will be disabled (grayed out). When the workbook is closed, the control will be enabled again so it will be accessible in all subsequently opened workbooks.
If you wish to have access to the header and footer for 'maintenance', copy the following macro to the clipboard:
Sub HeadnFoot()
If Application.CommandBars("Worksheet menu bar"). _
Controls("View").Controls("&Header and Footer...").Enabled = False Then
Application.CommandBars("Worksheet menu bar"). _
Controls("View").Controls("&Header and Footer...").Enabled = True
Else
Application.CommandBars("Worksheet menu bar"). _
Controls("View").Controls("&Header and Footer...").Enabled = False
End If
End Sub
ALT + F11 to access the VBE.
INSERT > MODULE
Paste the macro into the module editing area to the right.
Close the VBE.
Press ALT + F8
When the Macros window opens, highlight this macro and click 'Options..'.
Enter a letter to be used as a keyboard shortcut and click 'OK'.
Close the Macros window.
Save the workbook.
Now, when you open the workbook and need to modify the header or footer, press CTRL + your shortcut letter and the control will be enabled. Press the keyboard shortcut again and the control will again be disabled. It is a 'toggle' macro.
Sincerely,
Harry

Similar Messages

  • Microsoft office 2010 headers and footers

    I use Microsoft Office Word 2010.
    I have a document which contains header and footer.
    It is enable the header and footer only in even pages.
    I want to enable it for all pages but not for the first page.
    How can I make it?

    On the Insert tab of the ribbon, click Header > Edit Header.
    This activates the Design tab of the ribbon (under Header & Footer Tools).
    Copy the even page header to the odd page header, and the even page footer to the odd page footer.
    In the Options group, clear the "Different Odd & Even Pages" check box, and tick the "Different First Page" check box.
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • Crystal Reports 2008 Missing Page Headers and Footers when Exporting Excel

    After upgrading from Crystal Reports 9 to Crystal Reports 2008 we have noticed that when we export to Excel the document no longer retains the page headers and footers.  After doing some reading I see that there is a property called ExportPageHeadersAndFooters that we can tap into.  However, I am unable to get this to work for me.  Below is my code, do you have any suggestions?
                    ReportDocument rdReport =  new ReportDocument();
                    rdReport.Load(sReportFilePath);
                    ExportFormatType exType = ExportFormatType.Excel;
                    // create an instance of excel formatting options
                    ExcelFormatOptions foFormat = new ExcelFormatOptions();
                    foFormat.UsePageRange = false;
                    foFormat.ExcelUseConstantColumnWidth = true;
                    foFormat.ExcelTabHasColumnHeadings = true;
                    foFormat.ExportPageBreaksForEachPage = true;
                    foFormat.ExportPageHeadersAndFooters = ExportPageAreaKind.OnEachPage;
                    // set up more exporting options
                    rdReport.ExportOptions.ExportFormatType = ExportFormatType.Excel;
                    rdReport.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
                    rdReport.ExportOptions.FormatOptions = foFormat;
                    rdReport.ExportToStream(exType);

    I was able to get it to work but I had to do this.
    ExportRequestContext expReqCntxt = new ExportRequestContext();
    expReqCntxt.ExportInfo = rdReport.ExportOptions;
    sExported = ((CrystalDecisions.CrystalReports.Engine.ReportDocument)rdReport).FormatEngine.ExportToStream(expReqCntxt);

  • Header Footer tool replaces headers and footers in PDF

    The header/footer tool replaces the headers and footers in my PDF, this header and footer I am referring to was not added in Adobe but was added in Word 2010, when I tried to add an additional header to my PDF (I added a page number) it replaced the footers that was already in my document. The only way I could get around this is with adding a header instead of replacing, which is quick fix, but as soon as you add more pages to your PDF and want to re-apply the header/footer to update the page number that I added to the header it would remove ALL headers and footers from the PDF.

    I am having the same problem.  Here are the steps.  We created a series of documents in WORD 14.0.7143.5000 32 bit.  Each WORD document has a footer specific to that document (i.e. WORD documents are: Business Plan, Market Study, etc. which are each a separate WORD document, each with a separate WORD footer).  Each WORD document is converted to PDF with Adobe X.  The PDF documents are then combined into a single document with Adobe X.  Then with Adobe X we create a new footer (i.e. Document Package, with date, etc.) which is applied to each page of the Document Package.  So each page of the Document Package SHOULD have a Footer of : (1) On the Left Margin - the original WORD document (i.e. Business Plan) and (2) on the right margin - the footer inserted with Adobe X (Document Package footer).
    Here is where it breaks.  The WORD footers are retained when we convert from WORD to Adobe.  The WORD footers for each document are also retained when we combine the several PDF's into a single PDF (Document Package).  It is only when we add the Adobe Footer to the Document Package that we lose all the original WORD footers.  The result is the Document Package has only that one Document Package footer (on the right margin), and we lose each of the footers which were in the original WORD documents (left footers).  I tried this two ways.  First was to modify the footer, and the second way was to add a new footer - neither works - both delete the original WORD footers.  Also, it is interesting because the original WORD footers do not show up in the ADOBE footer box (the screen where you enter the text and other information for the footer).
    The use of the Watermark might be possible, and it is probably the work around we will need to use, but it is a poor solution.  Please let me know when fixed.

  • Problems Aligning Text in Headers and Footers

    I have tried to add headers and footers to documents and the  alignment is wrong.  The center footer/header should be center-aligned  and the right header/footer should be right-aligned.  Unfortunately,  they are both left-aligned.
    The preview shows the headers and footers aligned correctly, but when  the headers/footers are inserted in the document, the alignment reverts  to left aligned, although it is centered and on the right side of the  page, as appropriate.
    This is not a problem in Acrobat 7.
    Please advise if this is a bug and is awaiting an update, or if there is  something that I need to do to fix this problem.
    This is a screen shot of the preview windowindicating the proper alignment as indicated in the ovals:
    Here is the actual document once the header and footer are added.  Notice how the alignment switches to flush left:
    Any guidance is appreciated.
    Thanks.
    - James

    Nope.  The good folks at Adobe have neither addressed this issue (and I have
    heard from others that it is a problem for them as well) nor have they been
    very good about maintaining my account to be able to log in and follow up on
    it.
    The truth of the matter is that it appears to be a glitch in some, but not
    all, versions of this product and clearly it is not a big enough problem for
    them to want to fix it.
    I wind up using Acrobat 7 when I need properly formatted headers and footers
    or ‹ and this ought to get the attention of the folks at Adobe and maybe
    prompt someone (anyone!) to take a look and fix this glitch ‹ you should
    check out PDFPen.  It does much of what Adobe can do including headers and
    footers.
    If I didn't already have Acrobat 7 (and 8 and now 9), I would ditch Acrobat
    and just use Preview or PDFPen.
    - James
    From:  superfluities1 <[email protected]>
    Reply-To:  <[email protected]>
    Date:  Tue, 04 Jan 2011 12:11:19 -0700
    To:  "James A. Sarna, Esq." <[email protected]>
    Subject:  Problems Aligning Text in Headers and Footers
    Anybody ever solve this problem? I just started using(trying too, that is)
    Acrobat Pro for writing letters and starting at the top I ran right into
    this problem. Seems like a deal killer.

  • PDF headers and footers

    Hi,
    Trying to write a vocal reader for a PDF document, however, stuff that people would normally skip are being read by the reader (headers, footers, page numbers, footnotes, etc).
    Anyone knows a way to programmatically recognize the type of the paragraph you are currently reading in a PDF file so the reader can skip those?
    Thanks,
    T.R.

    Depends on whether the PDF is tagged or not.  If it's tagged, then those things would be artifacts and you could skip them.  If it's not tagged, then you'll need to do the analysis yourself to make the determination.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Mon, 10 Oct 2011 08:07:34 -0700
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: PDF headers and footers
    PDF headers and footers
    created by traxster72<http://forums.adobe.com/people/traxster72> in PDF Language and Specifications - View the full discussion<http://forums.adobe.com/message/3962980#3962980

  • Pdf headers and footers again

    I have windows 7 -64bit with Safari 5.03 on my work-pc.
    When I try to Save As a .pdf files it won't, it shoes me only All Files in file type.
    Also when I try to print the .pdf, it prints only headers and footers.
    I have reinstalled adobe readers (suggested fix )several times, but it hasn't helped me. Any other ideas?

    Depends on whether the PDF is tagged or not.  If it's tagged, then those things would be artifacts and you could skip them.  If it's not tagged, then you'll need to do the analysis yourself to make the determination.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Mon, 10 Oct 2011 08:07:34 -0700
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: PDF headers and footers
    PDF headers and footers
    created by traxster72<http://forums.adobe.com/people/traxster72> in PDF Language and Specifications - View the full discussion<http://forums.adobe.com/message/3962980#3962980

  • Help needed - Headers and footers of subtemplates not working.

    Hi,
    I need to call 3 different subtemplates from the main template. Headers and footers of these subtemplates are differenet. When i call these subtemplates headers and footers is not getting displayed.
    Can anyone please suggest how to display the headers and footers of subtemplates when called from another template.
    Thanks.

    Hi,
    Thanks for your reply. Do you mean to call the headers and footers from the main template or in the sub template. I cant call in the main template because the headers and footers are different for each template. I used micrsosoft headers and footers in sub templates. But it didnt work. So created header and footer templates in the sub template and called them from the same sub templates using the call: statements. But when i run the prog am getting the below warning.
    Beginning post-processing of request 35618954 on node DSOTEST6HE at 15-FEB-2010 03:37:41.
    Post-processing of request 35618954 failed at 15-FEB-2010 03:37:42 with the error message:
    One or more post-processing actions failed. Consult the OPP service log for details.
    Note: am running the running prog from XML Publisher responsinilty and not from BIEE standalone.
    Thanks.

  • How to remove remove page headers and footers

    Hello
    I can't seem to remove headers and footers from my sheet in print view. I am trying to print a chart and the header and footer are eating up valuable real estate! When using 'Pages' I can simply turn them off, where is the equivalent setting in 'Numbers'.
    Any help would be much appreciated.
    Thanks

    Is it really useful to respond to a ridiculous rant ?
    We may perfectly define zero margins.
    What can't be done is to completely get rid of Headers and Footers as we may do in Pages.
    When we enter zero in the Header and Footer fields, we are defining the offset of the item to the top/bottom of the printable area. We don't set the item's height to zero.
    A workaround allowing us to get quite zero margins in Pages :
    Put the cursor in a header.
    Define the font size to 1.
    Put the cursor in a footer.
    Define the font size to 1.
    doesn't apply to Numbers.
    If we set the font size to 20, the header height become greater, if we set it to less than 10, the application set the item's height to 10 points.
    From my point of view, it's clearly a bug (already reported) but I don't know any application with no bug.
    So, if Mr MayBeDay is able to create an application without bugs, he may send a curriculum vitae to Apple which will certainly be glad to sign him.
    Yvan KOENIG (VALLAURIS, France) mercredi 5 janvier 2011 13:44:09

  • "Headers and Footers" error message

    Often when I'm in a topic and double-click on a template to
    open it and get some standard text, I get a dialog box called
    "Headers and Footers" which scolds me about "This topic was created
    from a template and the header and footer has been modified." There
    are two options: "Apply this modification to al topics created from
    the template" and "Apply this modification to this topic only.
    Note: Choosing this option will remove the link to the template."
    Weird this is, neither my topics nor my template have a header or
    footer. Did long ago, but I deleted it. Is this a common buggy
    error, or perhaps something residual from a header/footer of long
    ago? Thx, Eric

    Hi MunchMan and welcome to our community
    Normally, we use Templates to create Headers and Footers and
    apply them to a group or all topics. Naturally, if RoboHelp HTML
    thinks you have modified a Header or a Footer inside of a topic
    attached to a template, it is giving you the option of updating all
    topics with the template attached or disassociating from the
    existing template and basically "orphaning" the topic from any
    templates.
    I'm not sure I'd classify it as a bug. More along the lines
    of "working as designed" or "expected behavior".
    Cheers... Rick

  • How do I use Paged Media styles in css3 ( headers and footers ) ?

    I need to make printer friendly web pages, with neatly styled Page Headers and Footers.
    == This happened ==
    Not sure how often
    == Designing Style Sheets for Printer

    Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox.
    [http://forums.mozillazine.org/viewforum.php?f=25]
    You'll need to register and login to be able to post in that forum.

  • Only headers and footers appear attempting to print PDFs in Safari 5.0.2

    I am a Mac user trying to help my friend, who uses Safari 5.0.2 on his PC. He can open PDFs within Safari, but when he attempts to print them, all that appears are headers and footers (same thing appears in Print Preview).
    Any suggestions?

    One thing that might be worth a try is uninstalling and then reinstalling his Adobe Reader, Don. (The theory is that that should swap out the nppdf32.dll file governing the Adobe PDF plugin used by Safari.)
    Any better printing performance following the Reader reinstall?

  • In Pages, How can I get headers and footers to show up on more than the first page of each section?

    In Mountain Lion, I considered myself a fairly expert user of Pages. Since "upgrading" to Mavericks, I can't get even basic things to work anymore. My current problem is that the headers and footers are only showing up on the first page of each section. A related annoyance is that if I copy the information in a header or footer, all the associated formatting disappears when I paste it. But the first problem is the one that matters — headers and footers that only show up on one page sort of negate the whole point of headers and footers.

    If you click the link I posted previously, it takes you right to the Pages community.
    Here >  Pages: iWork: Apple Support Communities
    Then click New.

  • Printing w/o headers and footers in OSX10.5

    I am trying to print from Firefox (or any other browser) without the header and footer. I have seen posts from other places saying to use the 'Page SetUp' to adjust margins, remove headers/footers etc, but in OSX10.5 those options are not available. Any help??

    Bug Slinger
    Welcome to the Apple user discussion forums
    Look just to the right of the printer name in the print dialogue box and click on the little black triangle there - this will open a larger dialogue box that includes more options - in Safari print background and print headers and footers are there - the exact options depend on the software you are printing from
    LN
    Message was edited by: LarryHN

  • Different Headers and footers in case of multiple layouts

    Hi
    I have a requirement in which we have 4 layouts in one concurrent program and the layout to be selected is to be decided by the value of DFF at Invoice header level.
    The 4 layouts have different headers and footers for which i am trying use single template (RTF) or multiple sub templates through Import functionality in XML Publisher but not able to show different headers and footers in one document. Also i have tried with the ?start:body?> and <?end body?> tags but facing issues in displaying different headers and footers in one document as we cant call the same body tags again in one rtf.
    I am able to show different headers/footers data for 4 rtf templates by using import functionality as below but the footers can get shifted to next page if the line level records increases.
    Can someone please help. Want to know if its possible to have this functionality. Thanks in Advance.
    Regards,
    Sanket Z
    Edited by: 847314 on Feb 20, 2013 12:36 AM

    The possibility to have different headers/footers for 4 pages in a single word document. Is this functionality possible?
    I want to generate report in which the Invoice header DFF value will decide which template to pick up from 4 layouts and every template has different header/footer.
    i am trying use single template (RTF) or multiple sub templates through Import functionality
    There are two ways in which i am trying to achieve the solution.
    1. I am adding 4 layouts in a single document.
    We can't use the <?start:body?> and <?end body?> tags in one file multiple times so i cant go with this option.
    2. I am using import functionality in which i am registering one Master template which will call 4 sub templates as per the DFF value and that layout will be populated.
    Code for Master template
    <?if: TRX_TYPE ='INV'?>
    <?import:xdo://LLCUST.LL_TEST_LAYOUT1.en.AU/?><?call-template:SubledgerTemplate?>
    <?end if?>
    <?if: TRX_TYPE ='CM'?>
    <?import:xdo://LLCUST.LL_TEST_LAYOUT2.en.AU/?><?call-template:SubledgerTemplate2?>
    <?end if?>
    Code for Layout1 template(LL_TEST_LAYOUT1)
    <?template:SubledgerTemplate?>
    <?call-template:SubledgerTemplateHeader?>
    TAX INVOICE 1
    Invoice Date:TRX_DATE     
    Invoice No: TRX_NUMBER
    Lines data
    <?template:SubledgerTemplateHeader?> Header1<?end template?>
    <?template:SubledgerTemplateFooter?> Footer1<?end template?>
    <?call-template:SubledgerTemplateFooter?>
    <?end template?>
    But here after importing the RTF we need to call the particular template (<?call-template:SubledgerTemplate?>) which can't be combined with the <?start:body?> and <?end body?> tags. So the Footer will not be static at its place.
    Please suggest or let me know if you need any more info or i can forward you the template etc.
    Regards,
    Sanket

Maybe you are looking for

  • Battery life 5-6 hours?

    So I called apple because I have only been getting about 2 hours running Garage band and text edit with Bluetooth and airport turned off and the screen on next to last darkness. They told me that they are only replacing the batteries that get 30 minu

  • Import selected photos button not working, Please tell me how to enable this function.

    in Iphoto on macbook pro, the 'import selected' button blacked out, only 'import all photos' works, pls tell me how to get this to work. i'd like to transfer only selected photos to ipad. Have tried to import by copy/paste method into itunes but stil

  • Exact fetch returns more than requested number of rows

    Hi All, I have written sample code, in the 2nd curosr loop it is retriving me lot of records, yes will have if i select the statement. but i need all the organization id to be displayed. then i will check item exists in that organization if not assig

  • Plugging in iphone and itunes is telling me to download the 64-bit version.

    when i plug my iphone into my computer, itunes keeps telling me to go download the 64-bit version. so i uninstalled itunes and went and downloaded the 64-bit version. i went back into itunes, and it told me the same thing. i'm using a windows 7.

  • Update to Windows Phone 8.1

    Hi, I'm from Israel and i cannot update my cellphone Samsung ATIV S i8750 to WP 8.1 because there is no available update in my country (Israel). i have windows phone version :8.0.10211.204 and in order to upgrade i need minimum version: 8.0.10322.71