+ Reply to Thread
Results 1 to 2 of 2

Open and closing a workbook using On.Time Application

  1. #1
    Registered User
    Join Date
    04-07-2015
    Location
    Kent, Ohio
    MS-Off Ver
    2007
    Posts
    1

    Open and closing a workbook using On.Time Application

    I have a read only workbook that is used on roughly 25 workstations daily. This workbook contains details for all of our customer specs. I update this often sometimes daily as the specs change or new customers are added. This excel file is located on our network drive and each work station has a short cut that points to the network drive to launch the read only file. Once the excel file is opened at the work station the user has to enable the macros for the workbook to function properly. In the workbook I have a routine in place that runs at 5pm to close the workbook and then reopen it. It works as it should on the day the file is opened but come the next day at 5pm it doesn't run the routine again. I think it has something do with killing the timer but I am not sure. Any and all help would be appreciated. I have copied the code below, most of this I found on the web!

    What I am trying to acheive is to have the most current information at all of our workstations without having to personaly go around to close and reopen the excel file or to count on everybody doing it everyday.


    Thisworkbook

    Please Login or Register  to view this content.
    Module

    Please Login or Register  to view this content.
    Last edited by AmosInOhio; 04-08-2015 at 07:33 AM.

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Open and closing a workbook using On.Time Application

    Hi AmosInOhio and welcome to ExcelForum.

    The following thread may answer your question. You may have to add a date reference: http://stackoverflow.com/questions/2...-time-tomorrow

    The TimeValue() function returns a decimal number between 0 and 1 indicating the fraction of a day. Try adding 1 to have the time use tomorrow (i.e. add 24 hours).

    --------------------------
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

    Lewis
    Last edited by LJMetzger; 04-07-2015 at 08:11 PM.

+ 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. Closing a workbook if someone has it open
    By cedric9996 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-11-2014, 06:07 PM
  2. Open a workbook off my desktop then closing current workbook
    By superchew in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-18-2013, 03:34 PM
  3. open userform when closing workbook > help
    By step_one in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-22-2011, 12:46 AM
  4. [SOLVED] Closing an open workbook
    By Dan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-16-2006, 04:00 AM
  5. Stopping Application OnTIme when closing a workbook
    By L2B in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-16-2005, 10:20 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