I am trying to remove leading spaces in my text using VBA as I am trying to write the contents to a text file.
If the sentence has leading whitespaces then this has an affect on where this sentence starts in my text file - it will be indented from the left and I don't want that as I would like it to start from the beginning.
Capture.PNG
From the above image, you can see that my temp3 variable has leading whitespaces.
I want to remove it and so I used this code below:
but that is not doing it.Please Login or Register to view this content.
Then I tried using the trim function ie.) and that doesn't do either.Please Login or Register to view this content.
Does anyone know how to do it?
Bookmarks