Workbook_BeforeClose change event not running correctly

G

Guest

I have customised my Worksheet menu so that the "File" command is disabled
completely. To close, I have added a custom menu running a simple macro
called "CloseMe", containing the command "activeworkbook.close"
However, when I close in this way, my Workbook_BeforeClose (which restores
the Worksheet Menu Bar and Toolbars) doesn't run.
If re-enable the standard File Close command, and close this way it runs OK.
Is there any way in which I can force my BeforeClose macro to run when the
workbook is closed down via the first method, without having to add all the
BeforeClose commands to the "CloseMe" macro?

Thanks in advance & have a good weekend

Pete
 
G

Guest

have you tried:

application.screenupdating=false
workbook_beforeclose
activeworkbook.close
application.screenupdating=true
 
G

Guest

No, Excel didn't seem to like that,
It gave me "Sub or Function not defined"

Thanks anyway

Pete
 
G

Guest

Tom,

I'll take a look at what I've disabled & get back to you on Monday - it's
home time - yippee!

Have a good weekend

Pete
 

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