1. sFormatListItem-Items to be cross verified-array as input
2. oListBox -List object from the application screen

Public Function VerifyListBox(ByVal sFormatListItem, ByVal oListBox)

'Declaring the variables
Dim sWebList
Dim iCount
Dim iFlag
Dim strRep
Dim ltcExist

'Initializing the Variable
iFlag = 0

'Array values are stored in a variable using the split function
sWebList = Split ((sFormatListItem), ",")
'Looping through the items in a listbox to validate against the values passed from the datatable using the GetROProperty.
For iCount = 1 to oListBox.GetROProperty("Items Count")
If sWebList (iCount - 1) <> "" Then
'Use of GetItem to fetch the values from the application screen one at a time.
If oListBox.GetItem (iCount) = sWebList (iCount - 1) Then
'Setting the Flag value
iFlag = 1
End If
'Incrementing the counter until the list items get exhausted.
iCount = iCount + 1
End If

'Checking the condition and reporting the message accordingly.
If iFlag <> "1" Then
LOGGER.ReportEvent micFail,strRep , "All the fields mentioned in the test description are not present in the list box"
LOGGER.ReportEvent micPass,strRep, "All the fields on the application screen are validated with the values passed"
End If

End Function