+ Reply to Thread
Results 1 to 4 of 4

Using TimeBombMakeReadOnly gives run-time error?

  1. #1
    Registered User
    Join Date
    12-17-2010
    Location
    The D
    MS-Off Ver
    Excel 2007
    Posts
    23

    Using TimeBombMakeReadOnly gives run-time error?

    I am using Chip Pearson's code for setting a timebomb. However I am getting a run-time error '1004' Application-defined or object-defined error when the ExpirationDate is set on the second line of execution. Shouldn't this run as is or am I missing something here? I don't get why the error isn't handled with the "On Error" code ...

    Please Login or Register  to view this content.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Using TimeBombMakeReadOnly gives run-time error?

    You must have a defined name ExpirationDate that contains the date.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    12-17-2010
    Location
    The D
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Using TimeBombMakeReadOnly gives run-time error?

    It seems that this code was written to accommodate the pre-existing definition of the name (hence the On Error Resume Next handling). Testing this routine in a brand new workbook causes the same error, so I don't see how this can be the problem.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Using TimeBombMakeReadOnly gives run-time error?

    Do you have the constants C_WORKBOOK_ISSUE_DATE and C_NUM_DAYS_UNTIL_EXPIRATION defined?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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