checking for presence of menu

T

Tarjei T. Jensen

Is there a way of detecting the presence of a menu without

1. using "on error resume next" or
2. scanning a commandbar collection ("Menu Bar" in this case) and look for
the Caption name.

I'd be delighted if there was a way of doing just this.


greetings,
 
W

Word Heretic

G'day "Tarjei T. Jensen" <[email protected]>,

Nope! I'm guessing the real problem is re-scanning takes too long to
do over and over again. So, make a little subroutine. Use a Static
variable dimesnioned as an array to hold to the commandbar names. The
first time it is called it populates the array before scanning the
array. The succeeding times it just goes straight to the array. This
is much faster. To finesse, you can examine the properties of each
command bar before entering it into the array and filter the list
down.

Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Tarjei T. Jensen reckoned:
 
Top