Does anyone know if there is a function to remove or replace spaces within a string variable in VBA. I want something similar to the TRIM function that also removes spaces from middle of the string as well as the ends.

Thanks