Quote Originally Posted by anish.ms View Post
Hi Paul,
I was just thinking, how can an addin be restricted from using in other pcs.
Yes, your guessing is correct. CreateActivationKey and CheckActivation procedures from my above code can be called on loading the add-in and the activation form also can go to the add-in for activation.
Request your advice

Thanks for your time!
I don't see how having your add-in both generate the activation key and check it will do what you want

Any number of users can generate a key and check it



Having your add-in check to see if it's 'activated' before running is easy to do but easy to bypass by anyone who knows a little VBA

One cumbersome way might be to

1. Let user load add-in

2. If NOT activated

2a. Ask for Activation Code, OR Tell user that you generated some kind of PC hardware code (like in post #1)
2b. Send YOU the above code
2c. You generate a hash of the user's code
2d. Mail back
2e. User tries to run add-in again, and this time enters the hash from 2c
2f. Hash code stored in registry

3. If activated

3a. Generate PC hardware code (like in post #1)
3b. Hash it
3c. Compare to stored registry value (2f)
3d. If they match them let add-in load