Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - Formula Bar

Status
Not open for further replies.

behbeh

Programmer
Mar 10, 2001
48
0
0
US
Does anyone know how to programmatically detect when Excel's Formula Bar has focus? I need to disable a custom CommandBar when the the cursor is in the Formula Bar. Thanks!
 
Wow... I'm not sure that you can do that. I've never seen anything even related.

Why must the CommandBar be disabled? Maybe we could help you come up with another approach.

VBAjedi [swords]
 
Why not just hide the formula bar:
application.formulabar = false

then they can't select it !

Rgds, Geoff

Never test the depth of water with both feet

Help us to help you by reading FAQ222-2244 before you ask a question
 
Well,I've been playing around with this and found that Excel disables the VB/VBA CommandBar buttons (as well as a few other CommandBars)when the cursor is in the Formula Bar. Unfortunately, hiding the Formula Bar is not an option.
:(
The problem is that my custom commandbar macros do not run when they are clicked if the cursor is in the Formula Bar. It appears the command bar is not functioning; I would like to just disable the buttons; I would be happy to just intercept this and display a messagebox to the user, however, I don't know how to capture it.
 
Hi
I don't understand this but it may be of some use to you
Possible help at Planet Loomah!??!

xlbo
Shouldn't that be Displayformulabar?? Or has it changed since 2k?
Rooney?

Happy Friday
;-)

If a man says something and there are no women there to hear him, is he still wrong? [ponder]
The faqs ma'am, just the faqs. Get the best from these forums : faq222-2244
 
Thanks for the link, Loomah!!!
Happy Friday to you as well!
Also, if a man says something and there are no women there to hear him, he is still wrong, unless he is a member of this forum!
:-{}
 
Loomah - yes indeedy and mmmmmmm...Rooney - give him 2 years and he'll have a belly like his dad !!

Rgds, Geoff

Never test the depth of water with both feet

Help us to help you by reading FAQ222-2244 before you ask a question
 
Maybe you can send "Escape" to the active sheet
via code.

i.e.
sendkeys chr$(27)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top