Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Automate Open an XLS without running macro

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Automate Open an XLS without running macro

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" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Automate Open an XLS without running macro

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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running macro on file open excelnerd Excel Discussion (Misc queries) 3 March 12th 08 10:51 PM
Running macro on open of workbook? Lime Excel Programming 5 June 14th 06 06:41 PM
macro not running on workbook open Nick Smith[_2_] Excel Programming 4 May 11th 06 10:24 AM
Files won't open after running a macro TimZ Excel Programming 0 May 25th 05 01:58 PM
Auto Running a macro on open Jamie Excel Programming 2 May 24th 05 05:52 PM


All times are GMT +1. The time now is 09:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"