silentwolf
Well-known Member
- Joined
- May 14, 2008
- Messages
- 1,216
- Office Version
- 2016
Hi again,
hope you guys are kind to help me with this I can not work out..
this is a little test function I am trying to work it out..
However the myword is only a substring within strText the function is also larger and findes different words ans soforth..
So my issue is that myword could be wrinten in the text like MyWord or MYWORD and few more...
How can I make myword non case sensitive with the SELECT CASE statement?
Much appreciated as always .-)
hope you guys are kind to help me with this I can not work out..
Code:
Function TestGMBH(ByVal strText As String) As String
Dim strSearch As String
strText = LCase(strText)
Select Case True
Case strText Like "*myword*"
If strText Like "myword ref*" Then
TestGMBH = "REF found"
ElseIf strText Like "*myword iban*" Then
TestGMBH = "IBAN found"
ElseIf strText Like "myword ####*" Then
TestGMBH = "myword with Numbers found"
End If
Case Else
End Select
End Function
this is a little test function I am trying to work it out..
However the myword is only a substring within strText the function is also larger and findes different words ans soforth..
So my issue is that myword could be wrinten in the text like MyWord or MYWORD and few more...
How can I make myword non case sensitive with the SELECT CASE statement?
Much appreciated as always .-)
Last edited: