Then try
Add this function somewhere outside above procedure.![]()
'Your code For x = LBound(myArray) To UBound(myArray) myArray(x) = CleanAll("a" & myArray(x)) Next ' Your code
![]()
Function CleanAll(ByVal txt As String) As String With CreateObject("VBScript.RegExp") .Global = True .Pattern = "[\n\t\v\f\s]+" CleanAll = .Replace(txt, "") End With End Function
Bookmarks