JOB SECURITY- How to make a VBA script expire!

cgmojoco

Well-known Member
Joined
Jan 15, 2005
Messages
699
Has anyone come up with a method for making a VBA script expire?

I.e. it will only work for a specified time and requires the author of the script to renew it at a given point?

I want to be able to do this to strengthen my position as an independent contrator financially...and copy protect my work from unwanted exploitation

Some ideas:
1-MSG box requesting a pre-defined password to renew the time for the script to work along with contact info for the author

2-Ability to define # of days, months and or years the script will work

3-Ability to define the # of days, months and or years that a MSG box warning of pending expiration will appear

4Ability to define the # of days, months and or years that the renew will extend the use of the script with multiple pre-defined passwords allowing different lengths of time extention! Perhaps an encryption method allows you to in another excel sheet (say the comfort of your own home) generate at will a password that will extend a scripts life for 3 months?! They contact you again, and again you generate a "random" password that will extend the original script

5-Anti-hacking measures, using MS's built in security

This might be a useful way of extracting monies over time, for the use of a script you provide....pre-set

Ideas thoughts, point me to work already done in this area?

Thanks!
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
I don't think MS security is that secure to that specific point. How you you stop your code from being used? Delete the whole spreadsheet? AFAIK there's no such modules in Excel that supports this, and this is proven from numerous pay modules for excel which is a one time fee and not subscription based.

What you can do is to limit the number of working function module and slowly release to the company saying that this is an update/upgrade to enable them to work faster than the old code, or this is a new function that will benefit them.
 
Upvote 0
My employer asked me to include an expiration date in a model I developed for one of our clients. I used the following Workbook_Open event.

I'm expecting an email from them at the start of July!

Code:
Private Sub Workbook_Open()
    Dim Expiry As Date

    'If today's date > expiry date, the file will close



    Expiry = DateValue("30 June 2007")

    If Date > Expiry Then
        Application.EnableEvents = False
        Call MsgBox("This file expired on " & Expiry & ".  Please contact xxxxx for the latest version", vbCritical, "FILE HAS EXPIRED")


        Application.DisplayAlerts = False
        Application.ScreenUpdating = False
        ActiveWorkbook.Close

        Application.DisplayAlerts = True
        Application.ScreenUpdating = True
        Application.EnableEvents = True

    End If
End Sub
 
Upvote 0
You can preview LockXLS. This product does what you need. It creates protected trail ware and rental ware from Excel documents.
 
Upvote 0
The code from njimack is quite cool, but is there anyway to get round the fact you only need to open the database twice, because most users will try a few times? maybe a option to type in password here:

Application.DisplayAlerts = False
Application.ScreenUpdating = False

Some password coding

ActiveWorkbook.Close

to make it actice again? great idea for your job tho cgmojoco loving that! hence why wouldn't mind doing to my projects.

D
 
Upvote 0
NJIMACK's script is cool thanks!

So everyone reading this understands, it is examining the windows time, so a user can simply change it

But still pretty cool :)

I am HUGE on SHARING info, but if you are being paid and or there is something that you simply don't WISH to share, it's nice to have a simple little option like this where you aren't getting kicked in the face on a job

Obviously NJ's implementation isn't fullproof, but it's a **** nice deterent

Thanks NJ
 
Upvote 0
I firmly believe if someone wants to know how you did it then they will find out. Best thing to do is give them such a good spreadie that they say "I ain't even going to bother improving this", A rarety I know but Control sheets and columns go a long way and you can hide loads of dynamic info as well as passwords which are near indestructible.
 
Upvote 0
So everyone reading this understands, it is examining the windows time, so a user can simply change it.
LockXLS has an option to check time using Internet Time Server. So changing time will have no effect.
 
Upvote 0
Yes, agreed, LockXL looks to be a professional way of handling this I looked over the how-to's
Unfortunatley for some, it requires add-ins to be installed client side and a runtime library to be installed as well for it to work (these can be wrapped in a nice little package that LockXL provides, but still this might not be an option for some)

I think this thread shows how to get a custom little script up and running for those of us that just want to provide a deterent....most people stupid enough to try to jip a programmer on a script, will probably not even know how to circumvent even this meager deterent

:)

This great little thread has some great tools for both advanced and simple needs, thanks!
 
Upvote 0

Forum statistics

Threads
1,215,339
Messages
6,124,370
Members
449,155
Latest member
ravioli44

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top