I have created an excel-based game that I plan to distribute. However, I don’t want people to be able to then share it freely with others, so I am looking for ways to protect the document. A password could work but I figure that people could just share the password along with the file, so I started looking at an expiry date.
Within the ThisWorkbook module, I have added the following
Dim exp_date As Date
exp_date = "16/07/2023" 'update this'
If Date > exp_date Then
MsgBox ("Worksheet expired. Please contact creator to renew access")
ActiveWorkbook.Close
But even though it works to an extent, I’ve noticed that you can close the message box and then when you get the save prompt on closing, simply click ‘Cancel’ and you can carry on accessing the workbook as usual. How can I prevent this?
I have considered adding a ‘clear’ command within the expiry macro, but I worry that such a command would ruin the document for anyone who goes back to play after some time away. Perhaps there is an option to get a reactivation code that would postpone the expiry date.
Is there any way to prevent this? Or any other suggestions for how to effectively protect the file against mass sharing/distribution would be very welcome! I know that the VBA approach can be circumvented quite easily, but it would be better than nothing. In some similar threads, and it looks like the XLS Padlock software might be my best solution, but it is pretty expensive!
Within the ThisWorkbook module, I have added the following
Dim exp_date As Date
exp_date = "16/07/2023" 'update this'
If Date > exp_date Then
MsgBox ("Worksheet expired. Please contact creator to renew access")
ActiveWorkbook.Close
But even though it works to an extent, I’ve noticed that you can close the message box and then when you get the save prompt on closing, simply click ‘Cancel’ and you can carry on accessing the workbook as usual. How can I prevent this?
I have considered adding a ‘clear’ command within the expiry macro, but I worry that such a command would ruin the document for anyone who goes back to play after some time away. Perhaps there is an option to get a reactivation code that would postpone the expiry date.
Is there any way to prevent this? Or any other suggestions for how to effectively protect the file against mass sharing/distribution would be very welcome! I know that the VBA approach can be circumvented quite easily, but it would be better than nothing. In some similar threads, and it looks like the XLS Padlock software might be my best solution, but it is pretty expensive!