Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Detect event if excel is in edit mode.

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default Detect event if excel is in edit mode.

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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't edit Excel doc (Compatability Mode) Christian[_3_] Excel Discussion (Misc queries) 3 August 7th 08 07:30 PM
detect ctrl-c was pressed (in copy mode) from vba? Mad Scientist Jr Excel Discussion (Misc queries) 3 October 29th 06 06:34 AM
Combo Box goes to edit mode even if design mode is in OFF position Chas Excel Discussion (Misc queries) 0 January 7th 05 07:21 PM
Detect Group mode Tim Aurthur Excel Programming 3 October 22nd 03 06:17 PM
How to detect an entire column/row delete event? MV[_2_] Excel Programming 1 September 10th 03 01:03 PM


All times are GMT +1. The time now is 08:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"