Adding a subscription renewal feature to the file for my clients

skf786

Board Regular
Joined
Sep 26, 2010
Messages
156
Hello,

im making a financial solution for my customers in excel. i would like to offer this on the basis of an annual renewal of subscription. Is it possible to add a code to the file that automatically locks the file (or all sheets except a sheet named 'login') on the 31st of December at midnight.

The file may be reactivated only after the client inputs a renewal key in cell a1 on sheet named 'login'. Off course the key shall change for each subsequent year based on a formula that i can set and hide somewhere on the same sheet. Alternatively i can save 5 passwords for the next five years as well.

Thank you in advance.

regards,

SKF
 
Last edited:

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
You would have to add a workbook open event such as:

Private Sub Workbook_Open()

If date() > DateValue("AA200") then
Worksheets("Sheet1").visible = False
Worksheets("Sheet2").visible = False
else
End Sub
End Sub

Cell AA200 for example would be a locked field on your protected login worksheet that contains the date: December 31, 2021

On your login sheet, successful entry of a renewal key would need to trigger another function to do multiple things including:
- Unhide relevant sheets
- Unprotect the login sheet; Update the Date in cell AA200 to the next year end date; and lock the sheet again.

You'll also want to password protect your worksheets and your VB code so people won't easily be able to bypass it.
 
Upvote 0
Just a few things to keep in mind:

1. If they disable the VBA code when they open the file, this code will never run.
2. Excel/VBA security is actually not very secure, and can be broken without a whole lot of effort.
So if you are looking for some "adequately" secure solution, you are probably out-of-luck, using Excel and VBA.
 
Upvote 0
@Joe4, I agree completely. It's not difficult to get around these things...but if 80% of his clients don't know how to do it he's probably okay.

But definitely a good caveat. Thanks for weighing in.
 
Upvote 0
@Joe4, I agree completely. It's not difficult to get around these things...but if 80% of his clients don't know how to do it he's probably okay.

But definitely a good caveat. Thanks for weighing in.
It sounds like they may be trying to sell/market this, so it is definitely something that they should be aware of.
Or if they are trying to protect some proprietary information, all it takes is one person to hack it to ruin that for them.

In a nutshell, if you really NEED a "pretty secure" solution, Excel is probably not it!
I love Excel (as you can probably tell from the number of posts I have). but it is definitely NOT known for its security.
 
Upvote 0

Forum statistics

Threads
1,214,793
Messages
6,121,619
Members
449,039
Latest member
Mbone Mathonsi

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