Global Sub for All Lists
Posted: Fri Jun 07, 2013 1:37 am
I created this subroutine for a list box on my application and it works well but I have other list controls that require the same function. How do I go about creating a argument for the object (path) so all I need to pass into the sub is the object path?
Public Sub Set_Value_TaxTypeId()
Dim strTag As String
Dim strTxt As String
Dim intItemCount As Integer
intItemCount = repo.EDITSOLUTIONSClient.TaxTypeId.Options.Count
For intCount As Integer = 0 To intItemCount
strTxt = repo.EDITSOLUTIONSClient.TaxTypeId.Options.Item(intCount).InnerText
If strTxt = "Social Security Number" Then
strTag = repo.EDITSOLUTIONSClient.TaxTypeId.Options.Item(intCount).Value
repo.EDITSOLUTIONSClient.TaxTypeId.Element.SetAttributeValue("TagValue", strTag)
End If
Next
End Sub
Public Sub Set_Value_TaxTypeId()
Dim strTag As String
Dim strTxt As String
Dim intItemCount As Integer
intItemCount = repo.EDITSOLUTIONSClient.TaxTypeId.Options.Count
For intCount As Integer = 0 To intItemCount
strTxt = repo.EDITSOLUTIONSClient.TaxTypeId.Options.Item(intCount).InnerText
If strTxt = "Social Security Number" Then
strTag = repo.EDITSOLUTIONSClient.TaxTypeId.Options.Item(intCount).Value
repo.EDITSOLUTIONSClient.TaxTypeId.Element.SetAttributeValue("TagValue", strTag)
End If
Next
End Sub