Consulting

Results 1 to 3 of 3

Thread: VBA Code to Disable Insert Header & Footer on Ribbon

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    VBA Code to Disable Insert Header & Footer on Ribbon

    Hi guys,

    VBA newbie here looking to disable/grey out the button for "insert header & footer" on the ribbon on Excel 2016.

    I currently already have a module to replace all headers & footers with my desired custom settings but would also like to prevent anybody to edit it.

    I have done a search in the forum and on Google but only found older threads for earlier versions of Excel.

    Really appreciate any assistance! Thank you.

  2. #2
    This isn't easy to do and the Header and footer tab of the page setup dialog will remain available for your users to change the header and footer anyway.
    You could add ribbonX code to the workbook in question to disable the "Header and footer" tab of the ribbon that appears in Page Layout view as you click in the header. See: https://rondebruin.nl/win/s2/win006.htm
    Regards,

    Jan Karel Pieterse
    Excel MVP jkp-ads.com

  3. #3
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,724
    Location
    If you do decide to disable with RibbonX, the best CustomUI editor is at


    https://github.com/fernandreu/office-ribbonx-editor

    HOWEVER, it's best to read up on Fluent and it's concepts first

    There's also a CustomUI forum here where you can ask questions
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •