Enabling Events

G

Guest

Greetings !

For some reason the "Workbook open" subroutines don't work - I guess this
function may have been disabled on our "system" (they have disabled Key Alt
F11, but not the "Macro > Edit" )

Currently, I have to load the workbook, and then run the "Open" sub
manually.

Ditto with the "Activate" and "De-activate" subroutines....

Is there any way that *I* can re-enable this auto-run facility ?
If not, what do I ask our "systems" people to do ?
 
A

Ardus Petus

Alt-F11 to get to VBE
Ctrl-g for immediate window
Type: Application.enableevents=true
Alt+Q to get back to Excel

Et voilà!

Cheers,
 
G

Guest

Hi Robin,

Type in the Immediata Window:
Application.Enableevents=True and press Enter

Regards,
Stefi


„Robin Clay†ezt írta:
 
G

Guest

Ardus Petus said:
Alt-F11 to get to VBE

Thank you for responding, but Alas ! No !

That doesn't work !

I fear it may have been disabled - how can I get it re-enabled ?
 
G

Guest

Stefi said:
Type in the Immediata Window:
Application.Enableevents=True and press Enter

Yes - but I have to load the workbook first !

It SHOULD run the "WorkbookOpen" routine automatically !

Thank you for writing.
 
G

Guest

Hi Robin,

I'm afraid you have no other choice than launch Excel without opening any
workbook, reset Enableevents as I told you and THEN open your workbook.
"WorkbookOpen" routine IS an event itself and will not run if Enableevents is
set to False!

Regards,
Stefi


„Robin Clay†ezt írta:
 
G

Guest

Stefi said:
I'm afraid you have no other choice than launch Excel without opening any
workbook, reset Enableevents as I told you and THEN open your workbook.

I guess there must be a way, somehow, to set EnableEvents = True as the
default ?

Thanks for writing.
 
G

Guest

The default is true until a VBA command sets it to False. It remains False
until another VBA command sets it to True! Therefore once it is set to False,
you MUST use Application.EnableEvents = True! You can issue this command
anywhere you want (in a normal module, Immediate window) EXCEPT in an event
Macro (because it will NOT run until EnableEvents is not set to True in an
other way)!

Regards,
Stefi



„Robin Clay†ezt írta:
 

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