Excel 2007 ribbon issue when in cell edit mode

I have the most basic tab created for the Excel 2007 ribbon, xml at end along with VBA

After Excel starts, if I click my tab, my button is enabled and it works.  After that, regardless of the state my current cell is in if I go back to my tab, my button is still enabled.

However, if when I start Excel I immediately enter something into cell A1, then while still in edit mode I click my tab on the ribbon, I get a beep, and my button is not enabled.  Furthermore, it will never become enabled short of disabling my add-in and reloading, or restarted Excel.
Interestingly enough, if I removed the getEnabled callback, it works fine.  However, if fails in the same way if I try to use a GetLabel callback.

Obviously, the problem is moot if the user is not in edit mode when he clicks my tab.  However, I can't control that.  What can I do to restore my tab to functioning if and when this situation occurs?

Ribbon XML:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon>
        <tabs>
            <tab id="myTab" label="ThisTab" >
                <group id="grp1" label="grp1" >
                    <button id="btn1" label="btn1Label" getEnabled="btn1Enabled" onAction="btn1CB"/>
                </group>
            </tab>
        </tabs>
    </ribbon>
</customUI>

VBA from my xlam file, Module1:
Option Explicit
Private Sub Btn1CB(control As IRibbonControl)
MsgBox "Btn1CB"
End Sub
Private Sub btn1Enabled(control As IRibbonControl, ByRef returnedVal)
returnedVal = 1
End Sub
n_l_devotieAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rory ArchibaldCommented:
This is a bug in 2007. AFAIK, it has already been reported and the response was simply that it will not be fixed in 2007. I haven't tested it in 2010, but will try to do so later if I get a chance.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
n_l_devotieAuthor Commented:
Thank you for responding to my question.  What I am chiefly interested in is if there is some reasonable workaround to the problem of reenabling my UI short of reloading the add-in or restarting Excel.  Any word on that?
-nld
Rory ArchibaldCommented:
Not that I am aware of, I'm afraid.
n_l_devotieAuthor Commented:
Apparently there is a workaround after all.  If one uses a onLoad="ribbonLoaded" specifier in the xlam file, t hen codes ribbonLoaded to save an instance of the IRibbonUI in the callback as, say, myRib, then invokes myRib.Invalidate from various App and Workbook event callbacks in an associated xla file, then the UI responds correctly.  Note that the tab must be a custom tab for this to work, if one tries to use TabAddIns it fails miserably.
--
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.