Created
February 18, 2016 21:12
-
-
Save ScottDeLuzio/e4515bb8df897c7859e0 to your computer and use it in GitHub Desktop.
Software Licensing for Excel Add-In Check License on Startup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub Workbook_Open() | |
httpRequestCheck | |
With ThisWorkbook.Worksheets("Sheet1").Range("A1") | |
' the And .Cells(4, 1) = 0 is probably redundant, and if you are allowing more than one activation per license key you should remove that part. | |
If .Cells(3, 1).Value = "valid" And .Cells(4, 1) = 0 And .Cells(5, 1) <> "in_use" Then | |
'call your add-in here | |
Else | |
'if the license is not valid, the number of activations remaining is greater than 0, and it is not in use elsewhere we should display the license activation UserForm. | |
Activate_License | |
End If | |
End With | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment