+ Reply to Thread
Results 1 to 3 of 3

How to stop running "ThisWorkbook" codes when opening Excel file by macro

  1. #1
    Registered User
    Join Date
    02-05-2014
    Location
    Prague, Czech Republic
    MS-Off Ver
    Excel 2010, Excel 2016
    Posts
    72

    How to stop running "ThisWorkbook" codes when opening Excel file by macro

    Hi everybody,

    I'd like to ask you for help in this particular case:

    - I have got an Excel file, that runs a macro that opens another workbook and copies over the data from this workbook

    - the problem is that the other workbook runs a macro (launch userform) whenever it's opened, which is annoying for the user.

    Do you have any idea, if one can actually somehow turn off "ThisWorkbook" codes?

    Please Login or Register  to view this content.

    Thank you for any suggestion!

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: How to stop running "ThisWorkbook" codes when opening Excel file by macro

    Disable events.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    02-05-2014
    Location
    Prague, Czech Republic
    MS-Off Ver
    Excel 2010, Excel 2016
    Posts
    72

    Re: How to stop running "ThisWorkbook" codes when opening Excel file by macro

    Thank you! Works great!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Running Code After "Opening File" Event Has Triggered Data Connection Refresh
    By david.nicholls in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-09-2013, 07:22 AM
  2. [SOLVED] Stop Users Saving Macro Enabled File as ".xlsx"
    By OzTrekker in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-17-2012, 11:33 PM
  3. Macro to select "Continue" when opening another file and prompted to update links
    By kwaldersen in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-25-2012, 11:57 AM
  4. Replies: 2
    Last Post: 10-15-2005, 10:05 AM
  5. [SOLVED] How to realize "enable macro" by VBA when opening a file with macr
    By FrankJIN in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-16-2005, 12:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1