Results 1 to 2 of 2

Thread: code for rotecting program

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2005
    Posts
    1

    code for rotecting program

    hello,

    Ineed a code for protecting my program made in access .what i need is the way how to limit my program ex:2 month and if the buyer pays for then i can release for few more months,and if not paid i want that program after expiration of time to be closed (locked) automatically.

    Thanks

  2. #2
    Frenzied Member DKenny's Avatar
    Join Date
    Sep 2005
    Location
    on the good ship oblivion..
    Posts
    1,171

    Re: code for rotecting program

    I have an Excel model published on a website that needs to expire every 3 months and then gets replaced with a new version.
    To achieve this I have a constant in my code called "ExpireDate" which I set to the date I want the model to expire.
    I also have a Boolean variable called "Expired" which is set as follows when the file is opened.
    VB Code:
    1. Expired = (Now >= ExpireDate)

    For each Sub in the model I include the following code before the main code is run.

    VB Code:
    1. If expired Then
    2.     MsgBox "This model has expired, please visting the home page for the latest version"
    3.     Exit Sub
    4. End If

    This prevents any code from running after the expire date.
    Declan

    Don't forget to mark your Thread as resolved.
    Take a moment to rate posts that you think are helpful

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width