+ Reply to Thread
Results 1 to 5 of 5

A scheduled (timer) message to close the WB appears even if WB is not open, then opens WB

  1. #1
    Forum Contributor
    Join Date
    04-29-2010
    Location
    Tallahassee, FL
    MS-Off Ver
    365
    Posts
    100

    A scheduled (timer) message to close the WB appears even if WB is not open, then opens WB

    This is so weird to me. We run a macro to update information in 60 cash files each day. We'd had problems with people leaving their cash sheet files open, which kept them from being updated, so I put a timer in each of the files that launches a message at 4:29pm that the file will save and close automatically at 430pm. The weird part is that if you open one of these files at any time during the day, close it and do not open it again, the message will still pop up on your screen at 4:29pm AND you'll find the same file you opened earlier is now open on your desktop! All of the coding was cobbled together, so my ability to analyze it is limited. Also, we are on a network, and I wonder if that has something to do with it. Any thoughts would be appreciated. Here's all the coding I added to the file:

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

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,651

    Re: A scheduled (timer) message to close the WB appears even if WB is not open, then opens

    If you schedule an OnTime event and you close the workbook before it executes, Excel will reopen that workbook to execute the event on time. The trick is to unschedule any ontime events before closing the workbook.

    Try this...

    Please Login or Register  to view this content.

    ThisWorkbook:
    Please Login or Register  to view this content.
    Last edited by AlphaFrog; 04-05-2018 at 06:40 PM.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,244

    Re: A scheduled (timer) message to close the WB appears even if WB is not open, then opens

    And another combination:

    1.ThisWorkbook:
    Please Login or Register  to view this content.
    2. Standar module:
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    04-29-2010
    Location
    Tallahassee, FL
    MS-Off Ver
    365
    Posts
    100

    Re: A scheduled (timer) message to close the WB appears even if WB is not open, then opens

    AlphaFrog, I received your post first, so I will give it a try and let you know what happens. Thanks!

  5. #5
    Forum Contributor
    Join Date
    04-29-2010
    Location
    Tallahassee, FL
    MS-Off Ver
    365
    Posts
    100

    Re: A scheduled (timer) message to close the WB appears even if WB is not open, then opens

    Thanks so much, AlphaFrog. You solved my problem and I really appreciate it!

+ 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. I need the VBA message box should open and close automatically while macro is running
    By Prabakaran3003 in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 06-13-2017, 02:03 PM
  2. VBA message box should open and close automatically while macro is running
    By Prabakaran3003 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-08-2017, 08:58 AM
  3. [SOLVED] Timer , code to check IF worksheet is open else Close it. ??
    By stevnb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-07-2012, 07:44 AM
  4. [SOLVED] Open file --> have pop up message appear --> click on pop up to close it
    By debbiesh in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-23-2012, 09:28 AM
  5. [SOLVED] Wrong worksheet opens when I open the file, no matter how I leave it when I close
    By nenadmail in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-21-2012, 03:53 PM
  6. [SOLVED] "Frontpage " message appears on attempting to open excel
    By stewart reid in forum Excel General
    Replies: 1
    Last Post: 09-14-2005, 12:05 PM
  7. [SOLVED] How can I program a message box to open when a user opens and exc.
    By Marcus in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-16-2005, 12:14 AM

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