Hi, This is a very old post, But I am still positive that I will get some reply. :)
Okay so I have a string like this
123
456

789

From 1 through 9 its one string. How can I remove the new line and the empty line from this string?
Output should be like this: 123 456 789

Well, you can scan through the string using a loop creating a new temporary string...

Try This

function StripNewLine(q as string) as string
    dim x as string
    dim n as long

    for n = 1 to len(q)
        if mid(q,n,1) <> vbcrlf then
            x = x & mid(q,n,1)
        end if
    next n

    StripNewLine = x
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.