Documentation Center

PslSourceString.ID

Returns the ID of the string. The ID can either be a numerical value or a string.

Syntax

Expression.ID as Variant

Expression Object of type PslSourceString

Dim s As PslSourceString
...
Dim id as Long
id = s.ID
If s.Resource.Type = "StringList" Then
  id = 16 * (s.Resource.ID - 1) + s.ID
Else
  id = s.ID
End If

Example

REM This example hides all strings with an id > 65000
Dim i As Long, count As Long, id As Long
Dim src As PslSourceList

Set src = PSL.ActiveSourceList
If src Is Nothing Then
  MsgBox("Run this macro with an opened source list")
  Exit Sub
End If

count = src.StringCount
For i = 1 To count
  With src.String(i)
    If(src.String(i).ResType = "StringTable") Then
      ' Calculate real ID
      id = 16 * (.Resource.ID - 1) + .ID
      If (id > 65000) Then
        .State(pslStateHidden) = True
      End If
    End If
  End With
Next