View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Detect event if excel is in edit mode.

Rajeev,

When you click in the formula bar, your custom control is disabled, by
virtue of the fact that the focus is on the worksheet, and VBE cannot take
the focus, and cannot run any macros. The only thing is that you cannot
explicitly see that it is disabled. Afraid I don't know how you could
intercept the formula edit, if indeed it is possible.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Rajeev" wrote in message
...
I have a custom command bar control which I want to disable whenever user

clicks inside the formula bar.
You will notice that whenever user clicks inside the FormulaBar in excel,

the File -- New menu is disabled. In the same way I want to disable my
custom control when user clicks inside the formula bar. The problem I am
facing is that there is no known event that triggers when excel is in edit
mode. So I am not able to trap this scenario.
It would be great if anyone can provide some inputs into this.