PC Review


Reply
Thread Tools Rate Thread

Automate Open an XLS without running macro

 
 
=?Utf-8?B?bWF0ZWxvdA==?=
Guest
Posts: n/a
 
      1st Aug 2007
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
 
Reply With Quote
 
 
 
 
Peter T
Guest
Posts: n/a
 
      1st Aug 2007
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


"matelot" <(E-Mail Removed)> wrote in message
news:1AD7F32E-CE9C-4603-936B-(E-Mail Removed)...
> 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



 
Reply With Quote
 
=?Utf-8?B?bWF0ZWxvdA==?=
Guest
Posts: n/a
 
      2nd Aug 2007
Thanks Peter. I'll try your approach. It sounds like it's going to work.

"Peter T" wrote:

> 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
>
>
> "matelot" <(E-Mail Removed)> wrote in message
> news:1AD7F32E-CE9C-4603-936B-(E-Mail Removed)...
> > 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

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open & update another file (through macro) while running macro Nitesh Microsoft Excel Programming 1 22nd May 2010 04:40 AM
How to automate running a macro on a batch of documents? =?Utf-8?B?YWRuYQ==?= Microsoft Word Document Management 2 6th Oct 2006 08:58 PM
automate running a macro via switch input, rather than button clic =?Utf-8?B?Y29ubmVsbHkwMQ==?= Microsoft Access 0 3rd May 2005 02:05 PM
Running a macro on open =?Utf-8?B?RG9ubmEgV2F0bGluZw==?= Microsoft Excel Programming 2 16th Mar 2004 11:51 AM
Automate open file, update links, run macro, close and save file Geoff Microsoft Excel Programming 2 26th Aug 2003 10:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:20 AM.