ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   2 questions - Creating a TimeBomb - Securing Code (https://www.excelbanter.com/excel-programming/280166-2-questions-creating-timebomb-securing-code.html)

David

2 questions - Creating a TimeBomb - Securing Code
 
I have two questions, I have created a mini VBA
application as a qualifying tool. I would like for that
application to stop working after a given date, so users
are forced to come back to me for the most current version
of the application. I had considered placing an if then
statement in the userform initialize area, so if the
system date is greater than the preset time, they would
receive an error message directing them back to me for an
updated copy. Could someone give me an idea of the code
that would accomplish this task, or alternately if there
are other ideas on how to achieve the end result, that
would also be greatly appreciated.

Part 2, is anyone aware of a good source of information on
how to practically protect users from accessing the VBA
code area of the document. I also know that this
protection is moderate at best, but a low hurdle for the
casual user should be good enough for this application.

Thanks for any assistance

Dave

Chong Moua[_2_]

2 questions - Creating a TimeBomb - Securing Code
 
Try this...
------------------------
Private Sub Workbook_Open()

Dim Expire As Date

Expire = #10/31/2003#

If Now < Expire Then
MsgBox "Your spreadsheet application will expire on: "
& Expire
Else
MsgBox "Your spreadsheet application has expired!",
vbCritical
ThisWorkbook.Close
End If

End Sub
------------------------
Hope this helps...

Chong Moua


-----Original Message-----
I have two questions, I have created a mini VBA
application as a qualifying tool. I would like for that
application to stop working after a given date, so users
are forced to come back to me for the most current

version
of the application. I had considered placing an if then
statement in the userform initialize area, so if the
system date is greater than the preset time, they would
receive an error message directing them back to me for an
updated copy. Could someone give me an idea of the code
that would accomplish this task, or alternately if there
are other ideas on how to achieve the end result, that
would also be greatly appreciated.

Part 2, is anyone aware of a good source of information

on
how to practically protect users from accessing the VBA
code area of the document. I also know that this
protection is moderate at best, but a low hurdle for the
casual user should be good enough for this application.

Thanks for any assistance

Dave
.


steve

2 questions - Creating a TimeBomb - Securing Code
 
David,

For question #2

You can go into the VBE and protect the project. Fair
or you can build your code into an Add-In and distribute this with the
workbook. Better.
I think a 'dll' is best, but don't know much about that.

--
sb
"David" wrote in message
...
I have two questions, I have created a mini VBA
application as a qualifying tool. I would like for that
application to stop working after a given date, so users
are forced to come back to me for the most current version
of the application. I had considered placing an if then
statement in the userform initialize area, so if the
system date is greater than the preset time, they would
receive an error message directing them back to me for an
updated copy. Could someone give me an idea of the code
that would accomplish this task, or alternately if there
are other ideas on how to achieve the end result, that
would also be greatly appreciated.

Part 2, is anyone aware of a good source of information on
how to practically protect users from accessing the VBA
code area of the document. I also know that this
protection is moderate at best, but a low hurdle for the
casual user should be good enough for this application.

Thanks for any assistance

Dave




David

2 questions - Creating a TimeBomb - Securing Code
 
The Time Bomb works perfectly, Thank You!
Dave
-----Original Message-----
I have two questions, I have created a mini VBA
application as a qualifying tool. I would like for that
application to stop working after a given date, so users
are forced to come back to me for the most current

version
of the application. I had considered placing an if then
statement in the userform initialize area, so if the
system date is greater than the preset time, they would
receive an error message directing them back to me for an
updated copy. Could someone give me an idea of the code
that would accomplish this task, or alternately if there
are other ideas on how to achieve the end result, that
would also be greatly appreciated.

Part 2, is anyone aware of a good source of information

on
how to practically protect users from accessing the VBA
code area of the document. I also know that this
protection is moderate at best, but a low hurdle for the
casual user should be good enough for this application.

Thanks for any assistance

Dave
.


Tom Ogilvy

2 questions - Creating a TimeBomb - Securing Code
 
Now hold down the shift key while you open the workbook.

--
Regards,
Tom Ogilvy

"David" wrote in message
...
The Time Bomb works perfectly, Thank You!
Dave
-----Original Message-----
I have two questions, I have created a mini VBA
application as a qualifying tool. I would like for that
application to stop working after a given date, so users
are forced to come back to me for the most current

version
of the application. I had considered placing an if then
statement in the userform initialize area, so if the
system date is greater than the preset time, they would
receive an error message directing them back to me for an
updated copy. Could someone give me an idea of the code
that would accomplish this task, or alternately if there
are other ideas on how to achieve the end result, that
would also be greatly appreciated.

Part 2, is anyone aware of a good source of information

on
how to practically protect users from accessing the VBA
code area of the document. I also know that this
protection is moderate at best, but a low hurdle for the
casual user should be good enough for this application.

Thanks for any assistance

Dave
.




David

2 questions - Creating a TimeBomb - Securing Code
 
"BANG" .....
That is the sound of my "bubble" bursting,..

So...holding down the shift key while opening bypasses
code associated with the workbook open "time bomb". Is
there an easy way around that. I suppose that most casual
users will not know to do that shift trick when it
expires, but if there was a more robust method which I
could implement, it would probably be better.

Thoughts?
Thanks for the heads up
-----Original Message-----
Now hold down the shift key while you open the workbook.

--
Regards,
Tom Ogilvy

"David" wrote in message
...
The Time Bomb works perfectly, Thank You!
Dave
-----Original Message-----
I have two questions, I have created a mini VBA
application as a qualifying tool. I would like for

that
application to stop working after a given date, so

users
are forced to come back to me for the most current

version
of the application. I had considered placing an if

then
statement in the userform initialize area, so if the
system date is greater than the preset time, they would
receive an error message directing them back to me for

an
updated copy. Could someone give me an idea of the

code
that would accomplish this task, or alternately if

there
are other ideas on how to achieve the end result, that
would also be greatly appreciated.

Part 2, is anyone aware of a good source of information

on
how to practically protect users from accessing the VBA
code area of the document. I also know that this
protection is moderate at best, but a low hurdle for

the
casual user should be good enough for this application.

Thanks for any assistance

Dave
.



.


Tom Ogilvy

2 questions - Creating a TimeBomb - Securing Code
 
The user always has the option of disabling macros. Most will be prompted
to do it in the current environment of viruses and their security settings
will be set to warn of macros. In xl2000 and later, if security is set to
high and they have not accepted the code as being from a trusted source
(given that it was certified), the macro will be disabled without prompt.

If you put the code in an Addin, then the code will not be disabled I don't
believe. So you might have to distribute an addin and a workbook - this may
not be all bad - as you just update the Addin and the users data stays in
tact. (which may or may not be applicable to your application).

There are games you can play with hiding sheets and so forth so nothing
useful is visible if macros are not enabled, but none of these approach is
foolproof. There are even password crackers readily available that will
allow a user to get into your code if you have it protected.

--
Regards,
Tom Ogilvy


"David" wrote in message
...
"BANG" .....
That is the sound of my "bubble" bursting,..

So...holding down the shift key while opening bypasses
code associated with the workbook open "time bomb". Is
there an easy way around that. I suppose that most casual
users will not know to do that shift trick when it
expires, but if there was a more robust method which I
could implement, it would probably be better.

Thoughts?
Thanks for the heads up
-----Original Message-----
Now hold down the shift key while you open the workbook.

--
Regards,
Tom Ogilvy

"David" wrote in message
...
The Time Bomb works perfectly, Thank You!
Dave
-----Original Message-----
I have two questions, I have created a mini VBA
application as a qualifying tool. I would like for

that
application to stop working after a given date, so

users
are forced to come back to me for the most current
version
of the application. I had considered placing an if

then
statement in the userform initialize area, so if the
system date is greater than the preset time, they would
receive an error message directing them back to me for

an
updated copy. Could someone give me an idea of the

code
that would accomplish this task, or alternately if

there
are other ideas on how to achieve the end result, that
would also be greatly appreciated.

Part 2, is anyone aware of a good source of information
on
how to practically protect users from accessing the VBA
code area of the document. I also know that this
protection is moderate at best, but a low hurdle for

the
casual user should be good enough for this application.

Thanks for any assistance

Dave
.



.





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

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