+ Reply to Thread
Results 1 to 6 of 6

Expiration date on a macro

  1. #1
    Forum Contributor
    Join Date
    11-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    200

    Expiration date on a macro

    I have this code at the beginning of a macro. I want that macro (if the macro button is pushed) to close the worksheet after 5/31/15. But at this point with the way I have it written, all they have to do is change the system date to 5/30 (or anything before) and the macro will work. I want to know if there is a code that that ensure it closes even if they do backdate the system date. Is this possible? Thank you!

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Expiration date on a macro

    Isn't this kind of like a duplicate?
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    11-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    200

    Re: Expiration date on a macro

    yes but you didn't know how to do it so I put it back out there to see if anybody else does. It may be impossible, I don't know.

  4. #4
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Expiration date on a macro

    Use the following code - it pulls todays date from an online site, so it won't matter what the system date is.
    Set references (in developer environment: tools -> references) to Microsoft XML & Microsoft HTML.

    Please Login or Register  to view this content.
    Please click the * below if this helps
    Please click the * below if this helps

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Expiration date on a macro

    I asked you why you want to do it.

  6. #6
    Forum Contributor
    Join Date
    11-25-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    200

    Re: Expiration date on a macro

    Thank you so much!

+ 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. Expiration Date on Macro
    By backyardfun in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-06-2014, 06:43 AM
  2. [SOLVED] Expiration Date on Macro
    By backyardfun in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-28-2013, 11:38 AM
  3. Storage and Expiration Date Macro Troubles
    By cobalt87 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-04-2013, 03:26 PM
  4. Auto_open macro using an "expiration date" to disable the spreadsheet
    By thl in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-13-2008, 06:51 PM
  5. Expiration date on Macro
    By Borg in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-01-2006, 12:24 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