Public Function removespace(ByVal strtext1 As String) As String

        If Not Len(strtext1) = 0 Then
            For K = 1 To Len(strtext1)
            If Mid(strtext1, K, 1) = Chr(13) Then
            strtext1 = Replace(strtext1, Chr(13) & Chr(10), ",")
            End If
            Next
        Else
        strtext1 = ""
        End If
removespace = strtext1
End Function

in vb6 you can use Replace() function :

Replace(YourStringHere, " ", "")
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.