Menu customizations affect all workbooks?

B

bradley.vernon

Hi,
I am trying to customize a workbook, and will be adding several menu
options that are specific to my user community. The menu additions are
intended to be temporary, and should not affect the behavior of ANY
other xls workbook. How do I ensure this happens?

The menu options are added using VBA code during the workbook open
sequence "auto_open()", and are removed during the "auto_close()"
sequence.

However, if someone is so foolish as to double click on an xls file
while this special workbook is open they will have the added options
available and I don't want them to even see the options, let alone
click on them. In addition, I am disabling a few of the standard menu
options ("Open...", and "New...") because they are meaningless in the
context of my application. Am I looking for trouble by doing this? I
don't think this will cause a problem, but who knows what MS has
dreamed up for the unwary :)

I would prefer that the double click action either does nothing, or
launches a completely new instance of Excel with none of the menu
modifications applied. Is this possible? If it is possible, how do I
do this?

I am not a VBA expert so a little patience is appreciated.

Regards, Brad
 
S

STEVE BELL

Check out the Activate and Deactivate options. I have found this useful for
just this purpose.

Private Sub Workbook_Activate()
[ build macro]
End Sub

Private Sub Workbook_Deactivate()
[delete macro]
End Sub
 

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