-
[RESOLVED] String length
I have defined a string variable:
Code:
Dim strSearchText as String
strSearchText = "Aug 16, 2016"
I thought the length of this variable would be 12 characters but when I type "Len(strSearchText)" in the Immediate window it shows the length to be 16 characters.
What am I missing?
-
Re: String length
Looks like you have some hidden characters in your string. When I copied your string from this post it said the length was 16. If I retype the string it says 12. If you put your cursor right before the first character of the string (in the VS editor) & press the right arrow key you will see where the hidden characters are.
-
Re: String length
Thanks, you're right. I copied/pasted the value ("Aug 16, 2016") from a webpage. The page must have included hidden characters. Thanks for your help and quick reply to my post :)