Skip to content

Online Validation

The Online Validation workspace ensures that your software remains in sync with your business logic long after the initial activation. By establishing a periodic “heartbeat” with the VBA Padlock Activation Kit installed on your web hosting, you can remotely revoke access, enforce subscription renewals, and neutralize leaked keys without redeploying your code.

VBA Padlock Studio Online Validation settings for periodic license checks


Online validation transforms a static license into a dynamic, server-managed asset. This is the cornerstone of any modern SaaS or subscription-based software model:

  • Remote Revocation: If a customer cancels their subscription or a chargeback occurs, simply mark the license as “Invalid” on your server. The DLL will detect this during its next validation cycle and terminate access.
  • Tamper Proofing: Every validation request includes a cryptographic challenge. This prevents “replay attacks” where a user might try to simulate a successful server response while offline.
  • Automatic Handshake: The process is entirely silent and automatic. The DLL performs the check during its initialization before any protected code is even loaded.

Balance user convenience with security by defining how often the “heartbeat” occurs:

Check Frequency

Choose from Every Startup, Daily, or Weekly checks. For lower-security needs, utilize the Random setting to vary the check timing.

Enforcement Mode

Define the consequence of failure. Choose Block Execution for strict enforcement or Show Warning for a “soft-nag” approach.


💻 Transparent Validation with VBAPL_IsLicenseValid()

Section titled “💻 Transparent Validation with VBAPL_IsLicenseValid()”

When Validate activation at every startup is enabled in this dialog, calling VBAPL_IsLicenseValid() in your VBA code automatically triggers an online validation check against your server — no additional code required. The DLL contacts the server, verifies the license status, and returns the result, all transparently behind a single function call.

This means your standard startup code already handles online validation:

Private Sub Workbook_Open()
On Error GoTo CleanFail
' Reset first cell
Dim ws As Worksheet
Set ws = ThisWorkbook.Worksheets(1)
ws.Range("A1").Value = "Hello World Excel Example"
If VBAPL_IsLicenseValid() Then
ws.Range("B2").Value = "Licensed To"
ws.Range("B3").Value = VBAPL_GetRegisteredName()
ws.Shapes("Button 1").TextFrame.Characters.Text = "Deactivate"
ElseIf VBAPL_IsTrialMode() Then
ws.Range("B2").Value = "Trial, please purchase"
ws.Range("B3").Value = ""
ws.Shapes("Button 1").TextFrame.Characters.Text = "Activate..."
Else
' Deactivated or no valid license
ws.Range("B2").Value = "No valid license"
ws.Range("B3").Value = ""
ws.Shapes("Button 1").TextFrame.Characters.Text = "Activate..."
End If
Exit Sub
CleanFail:
MsgBox "Initialization Error in Compiled Code: " & Err.Number & " - " & Err.Description, vbCritical, "Runtime Error"
End Sub

🔧 Manual Validation at Critical Moments

Section titled “🔧 Manual Validation at Critical Moments”

For finer control, you can also trigger an explicit validation check at specific points in your logic — for example, before starting a high-value export or data processing task:

' Force a validation check before starting a high-value process
If VBAPL_IsValidationRequired() <> 0 Then
If VBAPL_ValidateOnline(1) = 0 Then
MsgBox "Your subscription has expired. Please renew to continue."
Exit Sub
End If
End If

  1. Configure: Enable online validation and provide your Base Validation URL.
  2. Strategy: Set your check frequency (e.g., Daily) and your enforcement mode (Block vs. Warn).
  3. Sync: Ensure your PHP server’s /dovalidation endpoint is active and connected to your license database.
  4. Validate: Compile your project. The DLL will now automatically begin its heartbeat cycle on the next launch.