This function deletes the object with the specified index from the list.
object.Delete
aIndex
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISList interface |
|
aIndex |
In, Required | int |
The index of the patient in the list to be
deleted |
Fill in the list with the user-selected patients and display the number of patients in the list before and after deleting the first one.
Dim aList
Dim aPatient
Dim aMessage
Dim i
Set aList = Profile.CreateList
const aPatientCount = 2
for i = 1 to aPatientCount
set aPatient = Profile.SelectPatient
aList.Add(aPatient)
next
aMessage = "The number of patients in the list is " & aList.Count
for i = 0 to aList.Count - 1
set aPatient = aList.Item(i)
aMessage = aMessage & vbNewLine & " - " & aPatient.SurnameFirstName
next
aList.Delete(0)
aMessage = aMessage & vbNewLine &_
"The number of patients in the list after the excluding the first one is " &_
aList.Count & vbNewLine & " - " & aPatient.SurnameFirstName
Profile.MsgBox(aMessage)