Simple question: How do I shorten the code below? ie cut down the # of lines
If UValue="Sold" Then
Call uidoc.FieldSetText("UserName",UValue)
End If
If UValue="Faulty" Then
Call uidoc.FieldSetText("UserName",UValue)
End If
If UValue="Lost" Then
Call uidoc.FieldSetText("UserName",UValue)
End If
Subject: if or condition
Just to add one more option to the mix …
If UValue=“Sold” Or UValue=“Faulty” Or UValue=“Lost” Then Call uidoc.FieldSetText(“UserName”,UValue)
However, these seems to be strange values for a field called UserName.
Subject: if or condition
Select Case UValue Case “Sold”:
Call uidoc.FieldSetText("UserName",UValue)
Case "Faulty":
Call uidoc.FieldSetText("UserName",UValue)
Case "Lost":
Call uidoc.FieldSetText("UserName",UValue)
End Select
Rishi
Subject: if or condition
Select Case UValueCase “Sold” , “Faulty”, “Lost” :
Call uidoc.FieldSetText (“Username”, UValue )
End Select