I have had this up before but know I kinda know the problem and the question can therefore be direct.
When using this code with the string,
"CARL Kristian Thor" it works and prints CARL
"Patricia Märta Louise" it workand print all of the names
"Patricia" it returns nothing "null"
How can do an else if code so that NULL returns "Patricia"
When using this code with the string,
"CARL Kristian Thor" it works and prints CARL
"Patricia Märta Louise" it workand print all of the names
"Patricia" it returns nothing "null"
How can do an else if code so that NULL returns "Patricia"
Code:
Dim strResult
Dim booUpper As Boolean
namnet = "Patricia"
booUpper = False
For Each strResult In Split(namnet)
If Not (strResult Like "*[a-z]*") Then
booUpper = True
Exit For
End If
Next
[B]' Original code[/b]
If booUpper Then
TextBox18.Value = strResult
Else
TextBox18.Value = namnet
End If
[B]' Newly invented code that does not work[/b]
If booUpper = True Then
TextBox18.Value = strResult
If booupper = false then
TextBox18.Value = namnet
If booupper = Null Then
textBox.value = namnet2
End If