'Arguments Passed : 1. objSheet - Datatable object
' 2. strColumnName - Parameter name
'Return Value : True or False
Function Fn_VerifyDataTableColumnExists(byRef objSheet, byval strColumnName)
Dim intParamTotal
Dim intIterator
Dim intValue
' get total nbr of columns in datatable
intParamTotal = objSheet.GetParameterCount
' loop all columns
For intIterator = 1 To intParamTotal
'get name of column
intValue = objSheet.GetParameter(intIterator).Name
' compare if column name matches
If strComp(strColumnName,intValue)=0 Then
Fn_VerifyDataTableColumnExists=TRUE
Exit Function
End if
Next
Fn_VerifyDataTableColumnExists = False
End Function
No comments:
Post a Comment