Many thanks for this code - was exactly what I was needing, and is much much appreciated.