I have a String like this:
"5/1/2017 7:11:15 PM | String is very long - part 1 - part 999 - 2017-04-28.dots, Replace Existing"
This is the sub string I want to find the position in main string:
"String is very long - part 1 - part 999 - 2017-04-28.dots"
I tried to find it using InStr Function like this:
MsgBox CStr(InStr("5/1/2017 7:11:15 PM | String is very long - part 1 - part 999 - 2017-04-28.dots, Replace Existing", "String is very long - part 1 - part 999 - 2017-04-28.dots", 1, 1))
The result I expected is 23.
Instead of the result, it throws the following Error:
Type mismatch: '[string: "5/1/2017 7:11:15 PM"]' (Code: 800A000D)
As this error depicts, can't I use InStr Function to deal with Strings those have spaces?
Thanks in Advance.