I read through that thread and found while/endw. That does the job perfectly. Thanks