I am having trouble trimming a trailing space from a string that I have extracted from a cell as part of a macro.
I have looked at different options and the one that seems to be the best is the Trim function, in particular, the RTrim. Here is the code that I have written
The string values in the cells very in length from 2 to 4 chars (eg EF or ABDC) but always have 1 space at the end. In some cases there are spaces inside the string value (eg ST F or E F) and I need to keep those spaces.
When I run the above code, for the first messagebox I might get "BALT ." then the second message box appears with "BALT ." (exactly the same).
Anyone got any suggestions as to how I can do this?