HI ALL.

I'm looping through an array and trying to remove any leading or ending whitespace but I can't seem to figure out why it's not working as I get extra values which I believe are hidden TABS. Here is my code below to try and clean the array value . What am I doing wrong.


myArray = Split(TextBox1.Value, Chr(13))


 For x = LBound(myArray) To UBound(myArray) 'define start and end of array


           f = myArray(x)
           f = Replace(f, vbLf, "")
           f = Replace(f, " ",
"")