LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Stop Macros from Running When Workbook Opened via Automation

"MyFileI have an excel workbook that when opened by the user runs a macro
from the Workbook.OnOpen event. This then displays a VB form for the user to
enter some data.

I need to open this workbook using VBA from Access, add some data into the
cells on Sheet1, save and close the workbook and then email it to the user.

The problem is that when I use WorkBooks.Open("MyFileName") the code in the
Workbook.OnOpen event takes over and displays the form.

Is there any way I can stop all code in the workbook from running when I
open it using WorkBooks.Open("MyFileName"). The Macro security feature does
not apply in this case as this method seems to ignore the setting anyway.

Please help as I have reached a dead end.
Kind regards
Tim
 
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
How to stop running macros everytime I run excel? SusieOrtiz Excel Discussion (Misc queries) 1 August 18th 09 05:20 AM
How do I stop Excel from opening all files w/macros & running them BobC Excel Discussion (Misc queries) 4 April 5th 09 08:25 PM
How to stop Excel remembering/loading macro from previously opened Workbook Norman Yuan Excel Discussion (Misc queries) 4 June 17th 06 04:13 PM
Running of a Macro when Workbook is opened Darin Kramer Excel Programming 2 December 14th 04 01:06 PM
Workbook opened with macros disabled Alan.Hutchins Excel Programming 1 July 28th 04 09:44 AM


All times are GMT +1. The time now is 03:59 PM.

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

About Us

"It's about Microsoft Excel"