+ Reply to Thread
Results 1 to 6 of 6

How to get an error notification box to pop up on opening the workbook -Excel already open

  1. #1
    Registered User
    Join Date
    01-25-2018
    Location
    london
    MS-Off Ver
    365
    Posts
    43

    How to get an error notification box to pop up on opening the workbook -Excel already open

    Hey all,

    Bit of a weird question this one.

    I've got an excel workbook that needs to be on manual calculation - Otherwise it will go really weird and constantly recalculate infinitely! So i've got some code to do this.

    Please Login or Register  to view this content.
    The only issue is if the person has excel workbooks open already then it doesn't force manual calculation mode.

    So I was thinking it would be good to have an error message box pop up on start up (if they have already got excel open) to let them know to close down all other instances of excel before they proceed with using the file.

    Anyone got any ideas please?

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: How to get an error notification box to pop up on opening the workbook -Excel already

    Possibly...
    Please Login or Register  to view this content.

  3. #3
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: How to get an error notification box to pop up on opening the workbook -Excel already

    Please Login or Register  to view this content.
    The 'Workbook_Open' event occurs when the file holding that macro is opened and the Calculation mode is set when the macro runs, not when Excel application is opened. If the macro is not running when your workbook is opened, or the Calculation mode is not being set to manual, then you have another problem like the event trigger being turned off, which can be done with Excel being active when the Workbook_Open event occurs. I am not sure what to recommend without being able to see the conditions under which you experience the problem.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  4. #4
    Registered User
    Join Date
    01-25-2018
    Location
    london
    MS-Off Ver
    365
    Posts
    43

    Re: How to get an error notification box to pop up on opening the workbook -Excel already

    I'm happy with the code I've got for workbook_open i just wanted a message box to pop up if there was more than one excel file open and tell them to close everything and reopen.

  5. #5
    Registered User
    Join Date
    01-25-2018
    Location
    london
    MS-Off Ver
    365
    Posts
    43

    Re: How to get an error notification box to pop up on opening the workbook -Excel already

    No worries I found this here: https://www.mrexcel.com/forum/excel-...eady-open.html

    and adapted it into this and it seemed to do the trick:

    HTML Code: 

  6. #6
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: How to get an error notification box to pop up on opening the workbook -Excel already

    Thanks for the feedback,
    regards, JLG

+ 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. Ignore error while opening Excel workbook
    By HATEMHUSAM in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-26-2016, 03:40 AM
  2. Opening a UserForm1 With Workbook Hidden To allow Other Excel Docs to open normally
    By chrisandsally in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-28-2015, 11:28 AM
  3. Error opening excel workbook
    By mrblack12 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-23-2013, 08:56 AM
  4. Replies: 2
    Last Post: 08-16-2010, 05:24 PM
  5. [SOLVED] Error when opening Excel workbook
    By dcournoyer in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-01-2006, 10:55 AM
  6. Opening Excel with no workbook open
    By The Jointer in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-27-2006, 04:11 AM
  7. Error Opening an Excel Workbook
    By [email protected] in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 10-24-2005, 11: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