Considering the New Metro Interface—Ribbon Redux?

Microsoft has made it quite plain that the new Metro interface will be the default interface for Windows 8. All one has to do is spend some time looking at the Building Windows 8 blog posts to discover this fact—Metro appears all over the place. In fact, Microsoft is adamant that you will like the Ribbon and Metro whether you want to or not. Of course, this means preparing developers to create applications for the Metro interface. However, the current emphasis is in trying to convince people that they won’t miss out on anything by using the old Start menu interface, but that they’ll really want to use the Metro interface for maximum functionality. Both interfaces use the same low level functionality and rely on the same HTML5 engine.

Something that began to worry me though is that Microsoft seems to be espousing an architecture that is more closed and propriety with Metro. For example, they tell you that the Metro-style Internet Explorer interface isn’t going to support plug-ins and that it’s a good thing it doesn’t. When has restricting third party add-ins ever made something better? One of the things that has made Windows a great platform over the years is that Microsoft has encouraged third party additions that make a stronger offering. Anything that Microsoft can’t offer is provided by third parties—users are free to pick and choose what they want as part of their application experience.

Microsoft’s decision to close their architecture actually began with the Ribbon. One of the reasons I wrote RibbonX for Dummies and updated VBA for Dummies was to help VBA developers to continue creating add-ins for Office products. (You can read my continued posts about these books in the RibbonX for Dummies and VBA for Dummies categories.) Now Microsoft is closing something else—Internet Explorer—a central part of the Windows experience.

I’m not the only one who has concerns about Metro, nor am I the only one who has noted that the Ribbon actually slows power users considerably. A recent ComputerWorld article discusses the problem of both interfaces slowing business users and the fact that Metro will require hardware updates for maximum functionality, despite Microsoft’s protestations to the contrary. I think that the Ribbon does indeed help the less skilled, non-geek, user to become more productive with less effort, but at the cost of hampering everyone else. I’ve learned though to wait to see how things work out. With the Ribbon, I think more people have won than lost, but those who have lost productivity have lost in a big way. Metro may prove to be more of the same. At least you can select the old Start menu interface if desiredOffice didn’t offer this option without a third party add-in.

What concerns me right now though is that Microsoft added a host of productivity enhancements to Windows 7 that really did make sense. I use many of them every day now and I’ve talked about them in Professional Windows 7 Development Guide. These enhancements apparently go by the wayside when you use the Metro interface, which makes me wonder why Microsoft developed them in the first place. I find that the new Windows 7 enhancements really do workI’m able to open my documents and get to work considerably fasterI feel much more informed about my work environment. It seems a shame that these enhancements will be left by the wayside if Microsoft ends up making Metro the only option a future version of Windows.

What do you feel about the new Metro interface? Is it a productivity enhancement or an impediment to getting things done quickly? I’m curious because I’ll eventually need to update my books for Windows 8. Which interface do I focus on during these updates? When you send your opinion, please let me know whether you’re speaking as a home user or as a business user. Let me know your thoughts at


Contact Me, Please!

I ran across an online review of one of my books the other day. The author was mainly complimentary, but said he couldn’t contact me using e-mail and found that he felt alone in using my book. He obviously had unsolved questions and felt that he had been left alone to solve them by himself. Of all of the complaints I receive about my books, not being able to contact me for help is the one that hurts worst.

I want you to be able to contact me. In fact, I check several times a day, five days a week (Monday through Friday) for reader e-mail and try my best to provide same day support. The only exception is when I’m out of the office on vacation (I’m striving to provide an automated message to let you know when I expect to return to answer your question). Even then, the first day back from vacation is spent answering reader e-mail. Your comments, questions, and general observations are incredibly important to me. Just in case you haven’t seen it in the book, my e-mail address is:

If you purchase one of my books, you’ll see my e-mail address in at least two places: About the Author and the last chapter of the book as a bare minimum. I try to make it a point to mention my e-mail address five or six times in the book. In at least some cases, you’ll also find my e-mail address on the back cover.

Despite my best efforts, you may find it hard to reach me. If you can’t reach me for whatever reason, contact the publisher. Every publisher I work with has a Web site with a contact page. Normally, the publisher supports a forum in addition to an e-mail address (plus other contact methods that vary by publisher). If you contact the publisher, you can be sure that the publisher will contact me. The publisher knows it’s in its best interest to send any reader queries my way as quickly as possible.

At this point in time, I want to wipe out the “I couldn’t contact the author” complaint from the face of the earth. If you have anything to say about one of my books, don’t be afraid to contact me and say whatever is on your mind. You may be surprised to find that I care deeply about your needs and want to be sure you get the best possible use from my books.

That said, there are some people who try to take advantage of me. I won’t provide free consulting and no, I really am not a marriage prospect (I’ve been happily married for 31 years now). I truly don’t have time to debug your personal project, no matter how much it might interest me (and believe me, you readers have come up with some truly amazing projects over the years). However, if you have any question about my book, the source code, additional materials, or anything of that sort, please contact me, rather than assume I won’t treat you right.

Now, here’s an opportunity to tell me how to improve my books. If there is some other place that you’d like to see my e-mail address, tell me about it. I truly want to hear from you. Let me know where it would help to see my e-mail address so that you can contact me about my books whenever you want. I’ll be waiting to hear from you at


Creating a Global Toggle Button

I’ve worked through a number of odd issues with the Ribbon and VBA in this blog and in two of my books VBA for Dummies and RibbonX for Dummies. For example, the Creating a Custom Styles Group post shows how to make a gallery look correct when you move it to a custom tab. Likewise, the A Quick Method for Adding Custom Ribbon Elements post demonstrates a new technique for customizing the Ribbon using built-in Office 2010 features. Unfortunately, those posts won’t show how to add some specialty controls to your custom Ribbon, such as a toggle button, that also automatically loads when Excel opens. In fact, most people assume that any custom Ribbon element must be added to the individual worksheet or as part of an Excel add-in. This post will dispel that notion.

Before you begin this article, make sure you’ve read the Creating Global Macros in Excel 2007 and 2010 post. You need to understand things such as the location of the PERSONAL.XLSB file on your system and its purpose. Of course, the main purpose is to provide a means of creating global applications that load immediately when Excel loads.

If you try to add a toggle button directly to the PERSONAL.XLSB file, you’re going to quickly find that the process doesn’t work. I tried for hours to get the toggle button to even appear. Regular buttons work fine. You can also easily add galleries using techniques I’ve discussed before, but toggle buttons proved elusive at best.

The trick is to think outside the box. You can create an individual file that contains a toggle button without any problem. Yes, it does require that you create a customUI entry in the application either directly (by changing the file extension of the file to .ZIP and adding the correct elements) or by using an editor, such as the CustomUI Editor. This post won’t cover the basics of creating a custom tab. If you don’t have a copy of RibbonX for Dummies or VBA for Dummies, you can find this information on a number of sites, including MSDN.

Begin by creating a standard Excel workbook and saving it an Excel Macro-Enabled Workbook (.XLSM file). You’ll need to add a custom tab, group, and toggle button to your workbook. Here’s the code I’ve used for this example. It’s nothing elaborate. In fact, I purposely made it simple to ensure that the post would focus on technique.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customUI onLoad="RibbonLoaded"
    <tab id="myTab" label="My Tab">
      <group id="myGroup" label="My Group">
             <toggleButton id="SayHello"
                           label="Toggle SayHello"

This toggle button has two events it must handle: onAction and getPressed. In addition, you must load the Ribbon before you can make anything work. To make the button functional, I needed to add the following macros and global variables to the workbook.

' Define a global variable to hold the Ribbon reference.
Dim Rib As IRibbonUI
' Determines the behavior button state.
Dim lBehavior As Boolean
' Callback for customUI.onLoad
Sub RibbonLoaded(ribbon As IRibbonUI)
    ' Save the ribbon reference.
    Set Rib = ribbon
    ' Initialize the behavior state.
    lBehavior = False
    ' Show a status message.
    MsgBox "Ribbon is Loaded."
End Sub
' Callback for SayHello onAction
Sub SayHello_Click(control As IRibbonControl, pressed As Boolean)
    ' Change the behavior state.
    lBehavior = pressed
    ' Update the control.
    Rib.InvalidateControl (control.ID)
    ' Display the status.
    If pressed Then
        MsgBox "The toggle button is pressed."
        MsgBox "The toggle button isn't pressed."
    End If
End Sub
' Callback for SayHello getPressed
Sub SayHello_Pressed(control As IRibbonControl, ByRef returnedVal)
    ' Return the current behavior state.
    returnedVal = lBehavior
End Sub

Don’t forget to make sure you define the relationships if you’re editing the file by hand. OK, at this point you have a toggle button that’s functional. If you save this file, close it, and then reopen it, you’ll find that you can click the button and it’ll tell you its state—either pressed or not pressed. That’s not really the big deal here.

Now, save your file as an Excel Binary Workbook (.XLSB file). Rename this file PERSONAL.XLSB and copy it into your XLSTART folder (such as, C:\Users\John\AppData\Roaming\Microsoft\Excel\XLSTART on my system). You’ll suddenly find that you have a global toggle button. It loads every time Excel loads and the macros work just as you’d expect. Please let me know if you have any questions about this technique at

The Ribbon in Windows 8

Windows 8 will include the Ribbon in a lot of places that you’ve never seen it before and it appears that Microsoft eventually plans to use the Ribbon everywhere it can. For developers, this means a major reworking of applications that have been stable for a long time. For users, it means learning a new way of doing things when the user hasn’t worked with a version of Office that includes the Ribbon. A blog entry by Preston Gralla put things into perspective for me. Even if you hate the Ribbon, you’ll have to use it in Windows 8.

In my book, C# Design and Development, I discuss the need to create a reliable user interface that works for every user who uses an application. A number of changes are occurring in Windows 8 that are going to prove interesting when viewed in the perspective of the user interface—who it serves best. Earlier versions of Windows are better suited for the power user because they provide a quick method of finding precisely what you need using toolbars and menus. However, novice users are often lost and sometimes can’t accomplish the required tasks at all.

RibbonX for Dummies describes how the Ribbon can simplify the user experience and even create a workflow environment for novice users. In fact, many of the examples in that book are based on workflows. I get into some examples of the Ribbon in the latest edition of VBA for Dummies, but not at the depth found in RibbonX for Dummies. The emphasis of these examples is to help you create a usable Ribbon interface in Office. The point is that the Ribbon is a useful interface for a particular group of usersmost likely the majority of Windows users who aren’t technically savvy. Many power users that I’ve talked with still view it as cumbersome and state emphatically that it slows them down. Managers I talk with are obviously most concerned about training costs associated with moving to the Ribbon.

Because the Ribbon has taken center place in Office, I’ve written a number of blog entries about it for VBA developers. I plan to continue covering the Ribbon for Office in the VBA for Dummies category. From what I’ve been reading in Steven Sinofky’s blog posts, it appears that at least some of the information I’m providing for VBA for Dummies readers will also apply to Windows 8 developers, but it isn’t clear yet at what level. However, I’ll keep tracking Windows 8 carefully and let you know how things start working out.

In the meantime, as a developer, you should start looking at applications outside of Office that use the Ribbon successfully. For example, you’ll find a good Ribbon experience in WinZip. Working with this user interface will likely provide ideas for a Ribbon for your own applications.

Of course, as an author, I’m constantly looking for reader input. How do you feel about the Ribbon? Do you think it’ll prove cumbersome or will it be a great benefit? What questions would you like answered in a user-level book about Windows 8 when it comes to the Ribbon? What would a developer need to know about it? Let me know your viewpoint at


Creating a Custom Styles Group

A problem with some of the automation provided by Word 2010 is that you don’t always get the results you want. Even if you create a custom Ribbon configuration as described in the A Quick Method for Adding Custom Ribbon Elements post, you may not get the results you want without some experimentation. For example, you might want to add a full version of the Styles group as shown here to a custom Ribbon.


As described in my previous post, Office 2010 makes it easy to add tabs, groups, and existing or custom commands to the Ribbon. The standard practice would be to create a custom tab, Styles group within that tab, and then add the Quick Styles command to it as shown here.


The result isn’t going to be what you expected. The Custom tab will look something like this:


You don’t see any of the styles. To see them, you must click the down arrow, rather than simply view them as you would on the Home tab. No amount of configuration in Word is going to change this display. In order to get the right appearance, you must export your customizations as described in my previous post and modify the XML directly. After you export the customizations, you see XML for the Custom tab that looks like this:

<mso:tab id="mso_c1.F646E0" label="Custom" insertBeforeQ="mso:TabInsert">
   <mso:group id="mso_c3.F7999E" label="Styles" autoScale="true">
      <mso:gallery idQ="mso:QuickStylesGallery" showInRibbon="false" visible="true"/>

It’s important to note that the autoScale=”true” setting is correct and it’s something you’d need to add if you were creating this code by hand. However, the <mso:gallery> tag isn’t set up correctly right now. Unfortunately, VBA for Dummies currently suggests the answer, but doesn’t discuss it outright. My book, RibbonX for Dummies, provides better information in this case on page 151 when it describes the attributes for a gallery. In order to get the appearance you want, you need to change the code so it looks like this:

<mso:tab id="mso_c1.F646E0" label="Custom" insertBeforeQ="mso:TabInsert">
   <mso:group id="mso_c3.F7999E" label="Styles" autoScale="true">
      <mso:gallery idQ="mso:QuickStylesGallery" size="large" visible="true"/>

which means removing the showInRibbon=”false” attribute and adding a size=”large” attribute. When you make these two changes and import the updated XML into Word, you’ll see a new version of the Custom tab as shown here:


As you can see, the Custom tab now presents the Quick Styles Gallery as you’d expect. There are many situations where you need to modify the Ribbon customizations using similar techniques to get the appearance you want. If you have any questions, please contact me at