Wiley.com
Print this page Share

RibbonX: Customizing the Office 2007 Ribbon

ISBN: 978-0-470-19111-8
Paperback
688 pages
January 2008
RibbonX: Customizing the Office 2007 Ribbon (0470191112) cover image
This title is out-of-print and not currently available for purchase from this site.

Download TitleSizeDownload
Code Download
This file contains all the code, samples, and examples from RibbonX: Customizing the Office 2007 Ribbon.
(Note that chapter 17 and Appendixes A, D, E, and F have no download materials.)
6.02 MB Click to Download
Error in Figure 6-14
The figure was incorrectly identified in the write-up to REUSE fig 6-10, it SHOULD have indicated to use fig 6-14.

28.58 KB Click to Download
Image, page 217
Second bullet details: While Microsoft may not have a built in method to test a CustomView, it doesn't mean that we can't come up with a way to do it. One method I've used in many solutions is to create a CustomDocumentProperty in the workbook.
You'd then need to modify the rxtglHideExpense_Click callback to write to the CustomDocumentProperty each time the button is clicked to record the appropriate state.
Since this is saved with the workbook, you can then use the Workbook_Open event to check the state of the CustomDocument property. You could then pass this value to the getPressed routine to ensure that the state is set correctly.
The code to create it looks similar to the following:

Dim sDocPropName As String
Dim DocProps As DocumentProperties

sDocPropName = "ButtonPressed"

Set DocProps = ActiveWorkbook.CustomDocumentProperties
DocProps.Add Name:=sDocPropName, _
LinkToContent:=False, _
Type:=msoPropertyTypeBoolean, _
Value:= '<--pass a TRUE or FALSE value here

You would then query the value with:
Dim sDocPropName As String
Dim DocProps As DocumentProperties

sDocPropName = "ButtonPressed"

returnedVal = ActiveWorkbook.CustomDocumentProperties(sDocPropName)

And write to it with:
ActiveWorkbook.CustomDocumentProperties(sDocPropName) = pressed

16.32 KB Click to Download

Related Titles

More By These Authors

Visual Basic

by Thearon Willis, Bryan Newsome
by Bill Evjen, Billy Hollis, Bill Sheldon, Kent Sharkey
by István Novák, Andras Velvart, Adam Granicz, Gyorgy Balássy, Attila Hajdrik, Mitchel Sellers, Gastón C. Hillar, Ágnes Molnár, Joydip Kanjilal
by Thearon Willis, Bryan Newsome
Back to Top