+ Reply to Thread
Results 1 to 3 of 3

Macros crash workbook

  1. #1
    Forum Contributor
    Join Date
    03-23-2007
    Location
    Essex, UK
    MS-Off Ver
    Office Pro 2010
    Posts
    275

    Macros crash workbook

    I have been testing a workbook for the last few days and have found a problem, im assuming somewhere in the macro below. The issue is when midnight strikes the workbook crashes and wont allow me back in unless i close via task manager and re-open the workbook.
    Please Login or Register  to view this content.
    P.S. if anyone wants to follow the workbook design then please goto this thread http://www.excelforum.com/showthread.php?t=647029

  2. #2
    Forum Contributor
    Join Date
    03-23-2007
    Location
    Essex, UK
    MS-Off Ver
    Office Pro 2010
    Posts
    275
    Bump!!!

  3. #3
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243
    hi,

    I'm only guessing here...

    The Helpfiles show that the Closedowntime needs to be a variant but I wonder if the use of Now causes the following to come into play?
    The 2003 Excel Helpfiles state:
    Date Data Type:
    ...
    Midnight is 0 and midday is 0.5. Negative whole numbers represent dates before 30 December 1899.
    Possibly the principle suggested in the below post will help you:
    http://excelforum.com/showthread.php?t=647476
    ie test if Now is >11pm & if so change CloseDownTime to be a specific time with tomorrow's date.

    Sorry, I haven't coded this but hopefully it will give you something to mull over & develop/test.


    Also, there is no line of code to reset the On Error statement, I think you should add the below line of code in somewhere (?):
    Please Login or Register  to view this content.
    hth
    Rob
    Rob Brockett
    Kiwi in the UK
    Always learning & the best way to learn is to experience...

+ 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