I'm using vbscript which is almost identical to VBA. I did the hard part, I read in a textfile, parsed it, and inserted the words and numbers into Excel.
But it's the "easy" part that's killing me. One of the columns which I am parsing has spaces prepended, such as
" John Smith"
I can't get rid the spaces. I've tried
Name = RTrim(Name)
name = Ltrim(Name)
name = Trim(Name)
I've even tried looping through the chars
str = ""
For i = 1 to Len(word)
C = Mid(word, i,1)
if C <> " " Then str = str & C
next
it's not working. They "look" like spaces but vb won't recognize them as spaces and so won't trim them. Why?
I'm trying to get this project on the floor NOW. Help !!!
But it's the "easy" part that's killing me. One of the columns which I am parsing has spaces prepended, such as
" John Smith"
I can't get rid the spaces. I've tried
Name = RTrim(Name)
name = Ltrim(Name)
name = Trim(Name)
I've even tried looping through the chars
str = ""
For i = 1 to Len(word)
C = Mid(word, i,1)
if C <> " " Then str = str & C
next
it's not working. They "look" like spaces but vb won't recognize them as spaces and so won't trim them. Why?
I'm trying to get this project on the floor NOW. Help !!!