ISIntStrings.Add

Description

This function adds a string to the list.

Syntax

object.Add(aString, aInteger = 0)

Part Attribute Type Description
object Required
The object always implements the ISIntStrings interface
aString In, Required
string
The string value
aInteger In, Required
Default value is 0
int
The int value

Return Value

int

Returns the added string.

Example

Display the added string and the text.

sub main
  Dim aHost
  Dim aLayout
  Dim aList

  Set aHost = Profile.CreateCDOFormHost
  aLayout = 0
  
  set aList = aHost.GetAccessionPatientTemplateList(0, aLayout)
  aList.Add "Default form", -1

  ShowList aList, "Patient prefs"
end sub

sub ShowList(aList, aCaption)
  Dim aText
  Dim i

  aText = aCaption & ":" & vbCrLf
  for i = 0 to aList.Count - 1
    aText = aText & aList.Item(i) & "(" & aList.Data(i) & ")" & vbCrLf
  next
  Profile.MessageBox aText
end sub
Note:

Version information

Added in v7.8.0