Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default How to stop macros in 2nd workbook?

Hi

I have an excel vba app that is used to collect data about risks in our
organisation. It uses userforms that start up with the spreadsheet.

I have created another spreadsheet in order to collect this data and create
reports. However, I need to open up the first spreadsheet to access the
data. I cannot find a way to stop the macros running when opening the first
spreadsheet from within the second through code, i.e. like holding down the
shift key as it opens.

Is there a way to emulate this through vba code in Excel?

I have tried sendkeys but it can't access the first sheet because its code
takes over when it opens :(

Thanks

Joe

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default How to stop macros in 2nd workbook?

Use Application.EnableEvents = False prior to opening the workbook. Reset
it afterward.

--
Jim Rech
Excel MVP


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
How to stop running macros everytime I run excel? SusieOrtiz Excel Discussion (Misc queries) 1 August 18th 09 05:20 AM
Temp Stop and Start Recording Macros. Mike Saffer Excel Worksheet Functions 0 March 20th 08 03:24 PM
How do I display stop recording toolbar for macros Randy Excel Discussion (Misc queries) 2 July 8th 05 08:56 PM
linking of macros with other workbooks. need to stop it! KyWilde Excel Discussion (Misc queries) 1 March 10th 05 07:13 PM
How do I stop Macros from opening with every excel spreadsheet? AlexMilos Excel Discussion (Misc queries) 1 January 13th 05 07:44 PM


All times are GMT +1. The time now is 04:43 AM.

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"