FYI: Instead of a repeat, you can filter out the blank lines by ... the filter command: function RemoveEmptyLines pData filter pData without empty return (pData) end RemoveEmptyLines Jan