Excel Expiration

H

Hamed parhizkar

I have made a spreadsheet for someone, they want to see it before I go over
there and install it but I dont want him to just steal it if I email it. Is
there anyway that the sheet can expire after a number of times the sheet is
opened or based on date?
 
K

Kent Prokopy

Add the following code to the ThisWorkBook module:

Private Sub Workbook_Open()
Dim OpenCount As Integer
OpenCount = GetSetting("MyApp", "Count", "OpenCount", 0)

SaveSetting "MyApp", "Count", "OpenCount", OpenCount + 1

If OpenCount >= 10 Then ThisWorkbook.Close SaveChanges:=False

End Sub

Then lock the project from viewing. After the workbook has been opened 10
times it will automaticly close.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top