Retrieve Expiration Date

Normally, the following code will also work for non-trial if your key has an expiration date or number of runs. Try it:

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