Rajeev,
As far as I know what you want to do won't work.
However, once you are in edit mode with the cursor active in the formula
bar, you also cannot run a macro from a menu. In simple terms, VBA is
disabled the moment you start editing. The net effect is the same - that the
VBA routine is disabled even if the menu appears to be available.
I'm not sure from your question whether you are using something other than
VBA which is then called from the menu. If so, I don't know what the
behaviour would be I'm afraid, but I don't think there will be anything you
can do to disable the menu.
Robin Hammond
www.enhanceddatasystems.com
"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.