+ Reply to Thread
Results 1 to 7 of 7

Stop Workbook_Open macro running...

  1. #1
    Registered User
    Join Date
    01-17-2016
    Location
    England
    MS-Off Ver
    2013
    Posts
    23

    Stop Workbook_Open macro running...

    I have a workbook that has a Workbook_Open macro, however I want to be able to have a message box that displays and if the user presses 'OK' the macro won't run.

    I tried this, but it doesn't work and I don't know why.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Stop Workbook_Open macro running...

    Try:

    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Stop Workbook_Open macro running...

    Or even easier, try the following sample.

    Please Login or Register  to view this content.
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Stop Workbook_Open macro running...

    Quote Originally Posted by mikeTRON View Post
    Or even easier, try the following sample.

    Please Login or Register  to view this content.
    Ah, but the msgbox will wait until you get a response. Using the shell popup, it will wait a set period, then if no response is received, it will continue...

  5. #5
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Stop Workbook_Open macro running...

    Quote Originally Posted by Olly View Post
    Ah, but the msgbox will wait until you get a response. Using the shell popup, it will wait a set period, then if no response is received, it will continue...

    That is a VERY valid point. I guess if I am giving someone the authorization to cancel something I think I want them to make the explicit decision. Ha

  6. #6
    Registered User
    Join Date
    01-17-2016
    Location
    England
    MS-Off Ver
    2013
    Posts
    23

    Re: Stop Workbook_Open macro running...

    I've tried Olly's suggestion, if I press OK then it doesn't run but the message doesn't disappear after 10 seconds - it remains open and therefore the macro doesn't run.

    Any suggestions?

    thanks

  7. #7
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Stop Workbook_Open macro running...

    Quote Originally Posted by KML1976 View Post
    I've tried Olly's suggestion, if I press OK then it doesn't run but the message doesn't disappear after 10 seconds - it remains open and therefore the macro doesn't run.

    Any suggestions?

    thanks
    Interesting, it also doesn't work for me, and Google tends to show it is a proper pain to diagnose.
    http://stackoverflow.com/questions/4...value-from-vba
    http://stackoverflow.com/questions/3...mer-expiration

+ 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. [SOLVED] Macro to stop running after 1 min
    By lexusap in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-02-2015, 10:16 AM
  2. Stop Workbook_Open macro from running
    By majosum in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-18-2013, 08:32 AM
  3. Private sub workbook_open code running workbook_open code from other project
    By marshall_massive in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-20-2013, 06:07 PM
  4. [SOLVED] Stop Macro from running after certain row?
    By balston2 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-04-2012, 12:34 PM
  5. Workbook_Open macro not running
    By mrice in forum Excel General
    Replies: 3
    Last Post: 10-29-2008, 05:48 AM
  6. Macro stop running
    By schnett in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-10-2008, 04:01 PM
  7. Stop Workbook_Open macro
    By munkayboi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-11-2007, 12:36 PM

Tags for this Thread

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