Purpose: check if the compiled workbook is in trial state

Insert the following code:

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


You can then call the function:

Sub Test_IsTrial()
If IsTrial() Then
   MsgBox "Trial"
   MsgBox "Registered"
  End If
End Sub



Warning: the function will return true only if the activation key has the "display nag screen" flag (trial):