ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Prevent file from working (https://www.excelbanter.com/excel-programming/342180-prevent-file-working.html)

Steph[_6_]

Prevent file from working
 
Hello. Is there a relatively fool-proof way of preventing code within a
file from working after a specific date?
Basically, like a licensing expiration. After the initial period is over, I
want the file to stop working...but in such a way that a somewhat savvy
programmer could not go in and, for example, remove a line in the code that
prevents the macro from firing.

I was thinking an open_event that checks the date, and prevents the file
from even being open? I don't know...I'm grasping here. Any ideas?
Thanks!!



Jim Rech

Prevent file from working
 
You cannot lock out a savvy user. Macros can be disabled and locked VB
projects can be gotten into.

--
Jim
"Steph" wrote in message
...
| Hello. Is there a relatively fool-proof way of preventing code within a
| file from working after a specific date?
| Basically, like a licensing expiration. After the initial period is over,
I
| want the file to stop working...but in such a way that a somewhat savvy
| programmer could not go in and, for example, remove a line in the code
that
| prevents the macro from firing.
|
| I was thinking an open_event that checks the date, and prevents the file
| from even being open? I don't know...I'm grasping here. Any ideas?
| Thanks!!
|
|



Steph[_6_]

Prevent file from working
 
Any suggestions for the "best" way? Maybe to lock out the average or
relatively savvy user? I sort of figured there was no foll-proof way...but
what's the most sophisticated way?

"Jim Rech" wrote in message
...
You cannot lock out a savvy user. Macros can be disabled and locked VB
projects can be gotten into.

--
Jim
"Steph" wrote in message
...
| Hello. Is there a relatively fool-proof way of preventing code within a
| file from working after a specific date?
| Basically, like a licensing expiration. After the initial period is

over,
I
| want the file to stop working...but in such a way that a somewhat savvy
| programmer could not go in and, for example, remove a line in the code
that
| prevents the macro from firing.
|
| I was thinking an open_event that checks the date, and prevents the file
| from even being open? I don't know...I'm grasping here. Any ideas?
| Thanks!!
|
|





Steph[_6_]

Prevent file from working
 
How about this - In an open even macro, if the date the code is run the
date of expiration, then delete a critical line of code from the procedure,
and then delete the open event macro. So basically this renders the code
useless, and I will know the line of ode that was removed. Possible?

"Jim Rech" wrote in message
...
You cannot lock out a savvy user. Macros can be disabled and locked VB
projects can be gotten into.

--
Jim
"Steph" wrote in message
...
| Hello. Is there a relatively fool-proof way of preventing code within a
| file from working after a specific date?
| Basically, like a licensing expiration. After the initial period is

over,
I
| want the file to stop working...but in such a way that a somewhat savvy
| programmer could not go in and, for example, remove a line in the code
that
| prevents the macro from firing.
|
| I was thinking an open_event that checks the date, and prevents the file
| from even being open? I don't know...I'm grasping here. Any ideas?
| Thanks!!
|
|





Tom Ogilvy

Prevent file from working
 
User disables code. Any code based solution then fails.

--
Regards,
Tom Ogilvy

"Steph" wrote in message
...
How about this - In an open even macro, if the date the code is run the
date of expiration, then delete a critical line of code from the

procedure,
and then delete the open event macro. So basically this renders the code
useless, and I will know the line of ode that was removed. Possible?

"Jim Rech" wrote in message
...
You cannot lock out a savvy user. Macros can be disabled and locked VB
projects can be gotten into.

--
Jim
"Steph" wrote in message
...
| Hello. Is there a relatively fool-proof way of preventing code within

a
| file from working after a specific date?
| Basically, like a licensing expiration. After the initial period is

over,
I
| want the file to stop working...but in such a way that a somewhat

savvy
| programmer could not go in and, for example, remove a line in the code
that
| prevents the macro from firing.
|
| I was thinking an open_event that checks the date, and prevents the

file
| from even being open? I don't know...I'm grasping here. Any ideas?
| Thanks!!
|
|







Steph[_6_]

Prevent file from working
 
Damn! Code can edit/remove code, right? So in theory for the relatively
unknowing user, something like this would work...

"Tom Ogilvy" wrote in message
...
User disables code. Any code based solution then fails.

--
Regards,
Tom Ogilvy

"Steph" wrote in message
...
How about this - In an open even macro, if the date the code is run

the
date of expiration, then delete a critical line of code from the

procedure,
and then delete the open event macro. So basically this renders the

code
useless, and I will know the line of ode that was removed. Possible?

"Jim Rech" wrote in message
...
You cannot lock out a savvy user. Macros can be disabled and locked

VB
projects can be gotten into.

--
Jim
"Steph" wrote in message
...
| Hello. Is there a relatively fool-proof way of preventing code

within
a
| file from working after a specific date?
| Basically, like a licensing expiration. After the initial period is

over,
I
| want the file to stop working...but in such a way that a somewhat

savvy
| programmer could not go in and, for example, remove a line in the

code
that
| prevents the macro from firing.
|
| I was thinking an open_event that checks the date, and prevents the

file
| from even being open? I don't know...I'm grasping here. Any ideas?
| Thanks!!
|
|









Jim Rech

Prevent file from working
 
You might just close the workbook from the Workbook Open event if it's
expired. And password protect the VB project. That's easier than trying to
modify your own code. Still if macros are disabled the workbook will open
just fine.

--
Jim
"Steph" wrote in message
...
| How about this - In an open even macro, if the date the code is run the
| date of expiration, then delete a critical line of code from the
procedure,
| and then delete the open event macro. So basically this renders the code
| useless, and I will know the line of ode that was removed. Possible?
|
| "Jim Rech" wrote in message
| ...
| You cannot lock out a savvy user. Macros can be disabled and locked VB
| projects can be gotten into.
|
| --
| Jim
| "Steph" wrote in message
| ...
| | Hello. Is there a relatively fool-proof way of preventing code within
a
| | file from working after a specific date?
| | Basically, like a licensing expiration. After the initial period is
| over,
| I
| | want the file to stop working...but in such a way that a somewhat
savvy
| | programmer could not go in and, for example, remove a line in the code
| that
| | prevents the macro from firing.
| |
| | I was thinking an open_event that checks the date, and prevents the
file
| | from even being open? I don't know...I'm grasping here. Any ideas?
| | Thanks!!
| |
| |
|
|
|
|




All times are GMT +1. The time now is 12:10 AM.

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