Presentation is loading. Please wait.

Presentation is loading. Please wait.

Customizing The Excel Ribbon

Similar presentations


Presentation on theme: "Customizing The Excel Ribbon"— Presentation transcript:

1 Customizing The Excel Ribbon
Excel provides the capability to customise the Ribbon to organise it to your preference. More interestingly, it is possible to create your own Ribbon tabs that can interact with your applications. This session will briefly show how to add items to the QAT and personalise the existing Ribbon, and then we will develop a Ribbon to manage a number of VBA macros, demonstrating dynamic Ribbon capabilities.

2 Thanks to our Main Sponsors:

3 About Me Bob Phillips Located in Poole, Dorset Freelance Consultant
Microsoft Excel MVP – 11th year Forum Activity VBAExpress – ExcelGuru – Excel Forum – MrExcel – Excel/VBA/BI Training PASS Excel BI Virtual Chapter – Chapter Leader

4 Customising the Ribbon
Provide navigation/launch functionality User context Presentational flourish Excel, Word, Access But … Limited built-in icons Windows On-premises solution

5 Demo

6 Demo File Versions xld.rxCustom v1.xlsm – a simple custom button xld.rxCustom v2.xlsm – changing button image xld.rxCustom v3.xlsm – custom ribbon xld.rxCustom v4.xlsm – custom images xld.rxCustom v5.xlsm – robustness & 32v64bit Excel xld.rxCustom v6.xlsm – table driven ribbon xld.rxCustom v7.xlsm – multiple control types xld.rxCustom v8.xlsm – remove all ribbons except … xld.PASSBy.xlam – an application ribbon

7 32bit v 64bit If your code needs to run on both 32 bit and 64 bit Excel, … add conditional compilation to your VBA. Microsoft devised two compile constants to handle this: VBA7: True if you're using Office 2010, 2013 False for older versions WIN64: True if your Office installation is 64 bit, False for 32 bit. Since the 64 bit declarations also work on 32 bit Office 2010, all you have to test for is VBA7: #If VBA7 Then     Private Declare PtrSafe Function GetDeviceCaps Lib "gdi32" (ByVal hDC As LongPtr, ByVal nIndex As Long) As Long #Else     Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hDC As Long, ByVal nIndex As Long) As Long #End If And then in the routine where this function is put to use: #If VBA7 Then     Dim hDC As LongPtr #Else     Dim hDC As Long #End If Dim lDotsPerInch As Long 'Get the user's DPI setting lDotsPerInch = GetDeviceCaps(hDC, LOGPIXELSX) Jan Karel Pieterse -

8 Tools Custom UI Editor – http://bit.ly/rxCustomUI
Excel Icons Gallery - Excel Control IDs – Notepad++ - Andy Pope’s Ribbon Editor -

9 Further Reading http://www.rondebruin.nl/win/section2.htm
RibbonX: Customizing the Office 2007 Ribbon Robert Martin, Ken Puls, Teresa Hennig ISBN:

10 Contact Info Website – Blogs – Twitter


Download ppt "Customizing The Excel Ribbon"

Similar presentations


Ads by Google