+ Reply to Thread
Results 1 to 6 of 6

Make a workbook expire - how?

  1. #1
    Registered User
    Join Date
    02-09-2006
    Posts
    8

    Make a workbook expire - how?

    Hi guys and gals,

    How do you set up a workbook so that it has an expiry date?

    I have a spreadsheet that others would like to use. I am happy for them to use it, but don't want them to let someone else (not on a shared network or anything). So I thought that I could set it so that it would expire in a month or 2 and I could send them a fresh copy.

    I know that this can be done, but have no idea how to do it.


    Any help please?


    Vim

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by Vim
    Hi guys and gals,

    How do you set up a workbook so that it has an expiry date?

    I have a spreadsheet that others would like to use. I am happy for them to use it, but don't want them to let someone else (not on a shared network or anything). So I thought that I could set it so that it would expire in a month or 2 and I could send them a fresh copy.

    I know that this can be done, but have no idea how to do it.


    Any help please?


    Vim
    I think you would need some VB Code, then something like:

    Set the worksheets to Excelveryhidden except for the front sheet which explains that the workbook needs Macros enabled.

    On Workbook_Open, test the date, if expired Unhide the sheet that says the book has expired. Delete all other sheets, otherwise Unhide the data sheets.

    hth
    ---
    Si fractum non sit, noli id reficere.

  3. #3
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi Vim,

    Once you are done with your code, could you be kind enough to share it with us ?

    Thanks
    Carim

  4. #4
    Registered User
    Join Date
    02-09-2006
    Posts
    8
    Quote Originally Posted by Bryan Hessey
    I think you would need some VB Code, then something like:

    Set the worksheets to Excelveryhidden except for the front sheet which explains that the workbook needs Macros enabled.

    On Workbook_Open, test the date, if expired Unhide the sheet that says the book has expired. Delete all other sheets, otherwise Unhide the data sheets.

    hth
    ---
    Okay, don't know where to begin with VB Code.

    I see what you are driving at for the code, but where do I learn how to do this?

  5. #5
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by Vim
    Okay, don't know where to begin with VB Code.

    I see what you are driving at for the code, but where do I learn how to do this?
    I guess as much as possible, Record Macro and view the code generated, it works well for learning.

    The 'Help' is pretty ordinary, but if you ever catch on to the Objects and their properties and relationships please share it with me

    Pick up and save those bits of code that you see, it's easier to copy than to invent the same wheel again.

    A few MVP's sites are also most useful for hints and tips, together with examples of code. http://www.mvps.org/dmcritchie/excel/excel.htm and http://www.exceltip.com/about.htm two sites you could see.

    hth
    ---

  6. #6
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by Vim
    Okay, don't know where to begin with VB Code.

    I see what you are driving at for the code, but where do I learn how to do this?
    We have a start point, the attached should ensure that the Macros are permitted, or sit on the splash page.

    The next requirement is to add the code for your date test, and set a VB password to prevent modification.

    If you open the attached with Macros on or off you should see / not-see the data.

    Where would you hide your date? - on the splash sheet so that it couldn't be amended?

    ---
    Attached Files Attached Files

+ 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