Determining which "mode" excel is in

G

Guest

I am using VSTO to develop a C# addin for Excel.

I have several commands in the ribbon that I do not want to be available if
the user has double clicked on a cell and is entering text.

How can I disable my buttons when the user is in either edit or enter mode?
(in the same way the ms alignment, styles etc buttons are disabled)

Also, is there any property I can use to discover the mode excel is in? I
have tried the application.ready property but it isn't what I'm looking for.
 
N

NickHK

Alice,
Whilst such functionality is not available from a VBA point of view, I have
seen advise from MS to check Application.Ready, although it seems it may not
function correctly.
This always returns True in VBA as it cannot run in Edit mode, so I can't it
test it now.

Otherwise, you can test if the menu item File>Open is enabled.

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top