Excel.xlb and Custom Menus

T

Taher Baderkhan

Hi,

I am having a problem with the Excel.xlb file. In the
workbook I am working on I am creating a custom MenuBar.
At the begining all my Menus and MenuItems were not
temporary except for the MenuBar. This caused the
Excel.xlb file to deflate and eventually caused Excel to
have a very slow startup time. I solved the problem by
setting all my Menus and MenuItems to be temporary.

The problem I am having right now is that for every
Popup Menu in the MenuBar Excel inserts the text [C u s t
o m P o p u p <some number>] in the Excel.xlb file even
when all the menus, menu items and Menubar are temporary.
This causes the Excel.xlb file to defalte at a slow rate.

I can delete the MenuBar by putting the delete code in
the Before_Closing event handler (which would kind of
solve the problem) however, my Custom Menubar is being
belt through an Add-in. If the user had multiple workbooks
open and closes Excel then The before_closing function
will get called before any of the "Save workbooks" prompts
appear. Therefore, if the user choses to cancel the
Closing of Excel by selecting the cancel option on
the "Save" dialog then Excel and that workbook would
remain open however, the menubar would be deleted.

Is there a way to get rid off the text [C u s t o m P o p
u p <some number>] in the excel.xlb file? By the way this
problem occurs on both Excel 2000 and Excel 2002
(Excel10.xlb)
 
K

keepitcool

Taher,

I think you've used DEflate where you mean INflate.

A very effective if somewhat drastic means to reset the xlb
is to delete it from an explorer window. On startup Excel
will create a nice clean excelX.xlb


But note:
Instead of DELETING standard menu's you should set the VISIBLE property
of the BAR or CONTROL to False.

Then, when your custom bars and controls are added as temporary, you
shouldn't have any more problems.

You may have to look at BAR's Protection property, as this may prevent
changes to the commandbar and its controls)

There's also a Global customization flag!
Commandbars.DisableCustomize

suc6...


keepITcool

< email : keepitcool chello nl (with @ and .) >
< homepage: http://members.chello.nl/keepitcool >
 
T

Tom Ogilvy

Commandbars.Disablecustomize

must have been added in xl2002 or later - don't see it in xl2000.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top