Time limit on passwords and file useage

stargazer

New Member
Joined
Mar 28, 2002
Messages
22
I would like to be able to allow time limited use of some spreadsheet files I provide to some of my clients. Is there a way to let them download one of my files with, for example, a 60 day password, or a 60 day expiration of the application, unless I supply a renewal code? Thanks in advance.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
If you would like an example of a Workbook I created as a fun challenge to that exact problem, e-mail me and I will be happy to forward it on. It contains a nag sheet that appears if they do not activate macros, and it makes all the other sheets veryhidden...etc. It also expires after an amount of time you dictate, and it has a splash screen that appears when the workbook expires that contains a button that when pressed, will fire off an e-mail to you telling you how great you are and could they please get an extension on their time...It was fun! :p

Have a good day,

Dave M.
 
Upvote 0
Wouldn't this be easily defeated if someone changed the date (back) on their system? If so, it'd be nice to see an example of how the timer could be set to 30 days (for example) and not be circumvented. Any takers?
 
Upvote 0
Welcome to the Board!

Excel is not a secure environment and has never been marketed as one. There are a lot of ways to skin a cat in Excel, but as John Walkenbach (www.j-walk.com) says:
How can implement a time-limit, so my workbook becomes useless after 30 days?

Many developers have worked out a method to do this sort of thing, but it's not 100% reliable. For obvious reasons, these developers prefer to not share this knowledge in a public forum.

Smitty
 
Upvote 0
Well, I do have my unshared methods of guarding against this sort of thing, but here's another idea that doesn't hurt to share.

You can forego being at the mercy of nefarious users, internal servers, and moody network admins, by getting the time yourself from an independent external source on the internet.

Just an idea, but something I cooked up for when some clients' employees get too creative with their system time settings. The macro below will place the current date and time in cell A1 of your Sheet2, taken from the US Navy clock. You can always reference your application to that.

The Navy being the Navy, their download format sometimes changes, but I just modified the formatting section of this macro today so it works fine. This macro adjusts for United States Pacific time, so you'd need to modify the 8 in this line
Range("B1").Formula = "=R1C1-TIME(8,,)"
to the hour you are set for wherever you are. I live in San Francisco, so my macro has an 8 for my local time, because California is 8 hours behind Greenwich. Note, I added a space in between HTML characters so delete those spaces if you copy this macro.


Sub TimeAfterTime()

With Application
.ScreenUpdating = False
.DisplayAlerts = False
.Calculation = xlCalculationManual
End With

Dim WebCopy As Object
Dim WebURL As String
Set WebCopy = Sheets("Sheet2")
WebURL = "http://tycho.usno.navy.mil/cgi-bin/timer.pl"
WebCopy.Activate
Cells.Clear

With WebCopy.QueryTables.Add(Connection:="URL;" & WebURL, Destination:=WebCopy.Range("A1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With

Range("1:2").EntireRow.Delete
Range(("A2"), Range("A2").End(xlDown)).EntireRow.Delete
With Range("A1")
.Replace What:=" < BR > ", Replacement:=""
.Replace What:="UTC", Replacement:=""
.Replace What:=".", Replacement:=""
.Replace What:=", ", Replacement:=", " & Year(Now) & " "
.Value = Trim(.Value)
.NumberFormat = "mmmm d, yyyy, hh:mm:ss"
End With

Range("B1").Formula = "=R1C1-TIME(8,,)"
Range("B1").Value = Range("B1").Value
Columns(2).AutoFit
Columns(1).Delete Shift:=xlToLeft

With Application
.ScreenUpdating = True
.DisplayAlerts = True
.Calculation = xlCalculationAutomatic
End With

End Sub
 
Upvote 0
Hi Tom... :confused: dang...I'm upset...I wonder how long it would have taken me to think of turning my systems clock back... oh well...thank for the nugget of info...thats a good idea for getting the date and time from the Navy...I think they should be around at least as long as my workbooks are used... :LOL:

Have a good day,

Dave (y)
 
Upvote 0

Forum statistics

Threads
1,214,629
Messages
6,120,630
Members
448,973
Latest member
ChristineC

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