Can you place a button in Excel header?

dendres

New Member
Joined
Aug 1, 2015
Messages
14
Hello,

I have a client who leaves their spreadsheet in Page Layout view, therefore always being able to view the header and footer. I've placed some buttons on the spreadsheet to run some VBA code. My client is asking if I can move the buttons into the spreadsheet's header. I cannot find a way to do this. I suggested we create move the buttons to the ribbon, but this was not desirable either.

Any suggestions on if this is possible?

Using Excel 2016.

Thank you.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
You can add shapes to the headers and footers, such as logos, icons, etc. But I don't believe the capability to attach a macro link is part of the properties of that class. At least, not with VBA.
 
Last edited:
Upvote 0
You need to use the microsoft Custom UI editor: http://openxmldeveloper.org/cfs-fil.../00-00-00-02-39/OfficeCustomUIEditorSetup.zip
Choosing Icons built into Excel for your buttons: https://www.microsoft.com/en-us/download/confirmation.aspx?id=11675

There are lots of posts on this site that talk about how to create buttons on the ribbon. It is easy. There are tons of other sites that give you detailed instructions on how to create a custom ribbon menu.
Open the tool above
Open your excel file in the tool
Choose a standard template
Change the names of the menu items and the button names
Generate your callbacks and copy them to a text file
Save the changes into your excel file
Open the file in Excel
Create a Module called Ribbon
Paste your callbacks into that module
Add calls to your Subs in the callbacks
Done
 
Upvote 0
You can add shapes to the headers and footers, such as logos, icons, etc. But I don't believe the capability to attach a macro link is part of the properties of that class. At least, not with VBA.

I was hoping this would be an option as well, but I can't find a way to do this either. Thank you though.
 
Upvote 0
You need to use the microsoft Custom UI editor: http://openxmldeveloper.org/cfs-fil.../00-00-00-02-39/OfficeCustomUIEditorSetup.zip
Choosing Icons built into Excel for your buttons: https://www.microsoft.com/en-us/download/confirmation.aspx?id=11675

There are lots of posts on this site that talk about how to create buttons on the ribbon. It is easy. There are tons of other sites that give you detailed instructions on how to create a custom ribbon menu.
Open the tool above
Open your excel file in the tool
Choose a standard template
Change the names of the menu items and the button names
Generate your callbacks and copy them to a text file
Save the changes into your excel file
Open the file in Excel
Create a Module called Ribbon
Paste your callbacks into that module
Add calls to your Subs in the callbacks
Done

Thank you for the instructions. Unfortunately, while I am familiar with how to do this already, my client does not desire to do it this way.

Thanks again for your time.
 
Last edited:
Upvote 0
Hello,

I wanted to give this topic one more chance to see if anyone knew for sure, one way or another, if this can be done? Can a button be added into a spreadsheet header for Page Layout View?

Thank you
 
Upvote 0
Hello,

I wanted to give this topic one more chance to see if anyone knew for sure, one way or another, if this can be done? Can a button be added into a spreadsheet header for Page Layout View?

Thank you
Let me re-phrase my original post. "No". The underlying software of Excel Application will not support that feature.
 
Upvote 0

Forum statistics

Threads
1,213,532
Messages
6,114,176
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top