Setting toggle buttons correctly in the ribbon

misi01

New member
Joined
Jul 13, 2011
Messages
31
Reaction score
0
Points
0
Location
Stockholm,Sweden
I have bought your book Ribbonx and am ploughing through it. Before buying it, I had already written a number of applications where I have customized the Ribbon, but I have to say, reading the book gave me a number of "aha" experiences.

To my question. I am thinking of implementing a toggle button that will allow the user to add/remove subtotals and outlines to their sheet. In chapter 6 (under figure 6-32) of the book, it talks about

You should be aware that this example is not set up to deal with the issue caused when the workbook is saved ......
A couple of clicks by the use would resolve the disparity ....

Unfortunately, the above suggestion is a no-go for me, so I need to know which state the togglebutton should have when the workbook is opened.

I'm thinking that the one way of checking whether the user saved the workbook with the subtotals showing or not might be to look for the string Grand Total in column A, but this would fail for a Swedish installation of Office (where I work).

Any suggestions ?
 

Bob Phillips

Super Moderator
Staff member
Joined
Mar 21, 2011
Messages
1,940
Reaction score
0
Points
36
Excel Version(s)
O365
If you add a callback to the toggle button, which I assume you will be doing, why not save the state of that toggle somewhere in the workbook, in a defined name for example?
 

misi01

New member
Joined
Jul 13, 2011
Messages
31
Reaction score
0
Points
0
Location
Stockholm,Sweden
Thanks Bob. A colleague just came in and we were talking about it. Unless a "better" (more elegant ?) idea comes up, I'll create a Technical sheet (veryhidden)
and save the state there as you suggest.
 
Top