Never mind, I've found the problem already.
I was cutting off one character too much.
I thought the While..Wend loop did it's job good, as no other names had the problem.
It only worked with names that have a length that was even.
Just a math problem here actually (zero-based strings instead of one-based).
' Remove spaces at the end of the name While Chr(a.Name$[a.Name$.length - 1]) = Chr(32) a.Name$ = a.Name$[..(a.Name$.length - 1)] Wend
I was cutting off one character too much.
I thought the While..Wend loop did it's job good, as no other names had the problem.
It only worked with names that have a length that was even.
Just a math problem here actually (zero-based strings instead of one-based).