ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   macro to time limit workbook (https://www.excelbanter.com/excel-discussion-misc-queries/23448-macro-time-limit-workbook.html)

ditchy

macro to time limit workbook
 
Hello there, is there a way for a macro, or does someone have a macro
to time limit a workbook, say three to five days. Similar to a 30 day
trial limit.
all help appreciated
regards, Ditchy


Harald Staff

Hi Ditchy

In its very simplest form (goes into the thisworkbook module):

Private Sub Workbook_Open()
If Date DateSerial(2005, 5, 1) Then
MsgBox "Trial period has expired", vbInformation
Me.Saved = True
Me.Close
End If
End Sub

What you have to do is find ways to
- ensure that macros are enabled by the user (usually done by making the
file worthless without macros),
- register and store the first date when the user tests the file,
- read time from the internet so that changing the system date won't help,
- copy protect the file and all parts of its content

HTH. Best wishes Harald



"ditchy" skrev i melding
oups.com...
Hello there, is there a way for a macro, or does someone have a macro
to time limit a workbook, say three to five days. Similar to a 30 day
trial limit.
all help appreciated
regards, Ditchy




ditchy

Thank you Harald for the info,
another question if I may. How do I (make the file worthless without
macros) ?
This may be a better option for me
regards
Ditchy


Paul B

Ditchy, have a look here for one way

http://www.danielklann.com/excel/for...be_enabled.htm

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"ditchy" wrote in message
oups.com...
Thank you Harald for the info,
another question if I may. How do I (make the file worthless without
macros) ?
This may be a better option for me
regards
Ditchy




ditchy

thanks Paul, your help again is much appreciated.
regards Ditchy


Harald Staff

That is a good, common way, yes. The general idea is to break something in
the Close macro that you fix in the Open macro -unless time is expired or it
isn't paid for or whatever. Breaking things like that is creative and fun to
program.

Note that these things aren't extremely safe, skilled excel users, like the
ones you find here, will have few problems breaking into your file. But for
the target audience "users" it's sufficient.

HTH. Best wishes Harald


"Paul B" skrev i melding
...
Ditchy, have a look here for one way

http://www.danielklann.com/excel/for...be_enabled.htm





All times are GMT +1. The time now is 02:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com