+ Reply to Thread
Results 1 to 3 of 3

Enforce code only within a given time frame?

  1. #1
    Registered User
    Join Date
    04-20-2011
    Location
    Mobile,al
    MS-Off Ver
    Excel 2003
    Posts
    29

    Enforce code only within a given time frame?

    I have a spreadsheet with code that will not allow a save unless an entry is made into a certain cell.However,I only need to enforce this code when the last entry is made for the previous day, which is done between midnight and 3 am.Any ideas on the best way to accomplish this?
    Thanks in advance-Greg

  2. #2
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Enforce code only within a given time frame?

    Excel keeps track on time during the day by counting each day as the whole number 1, and dividing it up for fractions. Each hour of the day would be 1/24. If you only want code to run between 12:00 AM and 3:00 AM, you could add this:

    Please Login or Register  to view this content.
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  3. #3
    Registered User
    Join Date
    04-20-2011
    Location
    Mobile,al
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: Enforce code only within a given time frame?

    Thanks Dave.perfect.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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