Hello Dave,
It has been confirmed that Excel does not expose an event when cells go
in/out of edit mode. But if you are using the method
http://www.codeproject.com/KB/office/Excel_Edit_Mode.aspx, a possible
workaround is to register the CommandBars.OnUpdate event, which will be
fired when CommandBar's status is changed. Each time we enter the edit
mode, the CommandBars's status is changed because some built-in
commandBarbuttons will disabled. The event will also be fired when we quit
the edit mode. Therefore, we could register the event with the code:
applicationObject.CommandBars.OnUpdate += new
Microsoft.Office.Core._CommandBarsEvents_OnUpdateEventHandler(CommandBars_On
Update);
and in the CommandBars_OnUpdate method, we could check if a certain
built-in CommandBarButton is disabled as the article
http://www.codeproject.com/KB/office/Excel_Edit_Mode.aspx says. If true, we
add a flag 'edit-mode' to store the state. When we quit the edit mode, we
check if the edit-mode equals true, and if the certain CommandBarButton is
enabled. If both return true, we assign false to the 'edit-mode' flag, and
tell the application that we are now quitting the edit mode.
Hope it helps.
Regards,
Jialiang Ge (
[email protected], remove 'online.')
Microsoft Online Community Support
==================================================
For MSDN subscribers whose posts are left unanswered, please check this
document:
http://blogs.msdn.com/msdnts/pages/postingAlias.aspx
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express/Windows Mail, please make sure
you clear the check box "Tools/Options/Read: Get 300 headers at a time" to
see your reply promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.