Purpose: retrieving subscription/licence information with VBA

XLS Padlock supports online activation and license validation for your Excel workbook app.

In some cases, you may need your activation server to pass some additional data about the subscription or license of your end user. The following VBA code allows you to get a custom string value returned by the server on a successful validation.

 

This function will only work after a successful validation. It will return blank data in all other cases.

 

Please refer to the documentation of the XLS Padlock's Activation Kit / FastSpring subscription kit / WooCommerce Integration Kit to see how to pass custom data to the workbook app during the validation process.

Public Function ReturnValidationAdditionalServerData()
Dim XLSPadlock As Object
 
On Error GoTo Err
 
Set XLSPadlock = Application.COMAddIns("GXLSForm.GXLSFormula").Object
 
ReturnValidationAdditionalServerData = XLSPadlock.PLEvalVar("ValidationAddServerData")
 
Exit Function
 
Err:
 
ReturnValidationAdditionalServerData= ""
 
End Function
 
 

 

You can then call the function. For instance, the following code sets the value of a cell:

 

Private Sub Workbook_Open()
 
Sheet1.Range("S24") = ReturnValidationAdditionalServerData()
 
End Sub