That fixed it:
Public Function ValidateTransaction(ByRef vTransaction)
Dim property1 As Object
Dim value1 As Object
For Each p As System.Reflection.PropertyInfo In vTransaction.GetType().GetProperties()
If p.CanRead Then
property1 = p.Name
value1 = p.GetValue(vTransaction, Nothing)
If (TypeOf value1 Is String) Then
If value1 <> " " And value1 <> "" Then
p.SetValue(sTransaction, value1 = value1.ToString.Replace(vbCrLf, " "), Nothing)
End If
End If
End If
Next
Return sTransaction
End Function