Mackeral
Board Regular
- Joined
- Mar 7, 2015
- Messages
- 249
- Office Version
- 365
- Platform
- Windows
If you call "Instr" with a null argument as in "Instr("Whatever","")" you always get back a 1.
It should return a 0 indicateing that it didn't match anything.
My solution:
It should return a 0 indicateing that it didn't match anything.
My solution:
Code:
Function In_Str(Look_In, For_Text) ' Correcting "Instr" function.
' 7/3/18 Created. WML
Prog = "In_Str"
If For_Text = "" Then
In_Str = 0
Else
In_Str = InStr(Look_In, For_Text)
End If
End Function ' In_Str()