Automate Open an XLS without running macro

G

Guest

I've created an XLS containing macro that I use as a template. I create
another XLS that contains macro to extract data from Access and populate into
the XLS template for each person. The problem is that once the code open the
template, it always asks whether I want to disable or enable the macro. Is
there a way for my code in the second XLS to open the template and disable
the macro because it has events in there that I don't want to run while I
populate the data.

Thanks for your help.
Mat
 
P

Peter T

Apart perhaps from Sendkeys I don't think so. Maybe you could temporarily
disable Events, but be careful to include error handling to ensure events
are re-enabled when done. Alternatively flag something that the code in the
other wb will recognise to early exit event code.

Regards,
Peter T
 

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