Workbook_BeforeClose

P

paul.morriss

I have some 'DeleteMenus' macros in the 'Workbook_BeforeClose'
procedure which works fine.

Private Sub Workbook_BeforeClose(Cancel As Boolean)

Run "DeleteModelsOptions"
Run "DeleteCostMenu"
Run "DeleteSpecListMenu"

ActiveWorkbook.Close savechanges:=False

End Sub


The problem I have is if a new workbook is opened as well and then
closed, it seems to run the 'DeleteMenus' macros of the other workbook,
therefore removing the menu's.

Don't understand why this is happening as the 'new'
workbook_beforeclose procedure is empty.

Help
 

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