and the sub is very basic
Public Sub VPLock()
On Error GoTo Err_Control
Dim vp As AcadPViewport
Dim gpCode(0) As Integer
Dim dataValue(0) As Variant
Dim objSelSet As AcadSelectionSet
gpCode(0) = 0
dataValue(0) = "VIEWPORT"
Set objSelSet = ThisDrawing.SelectionSets.Add("VPL")
objSelSet.Select acSelectionSetAll, , , gpCode, dataValue
For Each vp In objSelSet
If vp.DisplayLocked = True Then
vp.DisplayLocked = False
End If
Next
Exit_Here:
Exit Sub
Err_Control:
Select Case Err.Number
Case "-2145320851"
ThisDrawing.SelectionSets.Item("VPL").Delete
Err.Clear
Resume
Case Else
MsgBox Err.Number & Err.Description
Err.Clear
Resume Exit_Here
End Select
End Sub