Hi thanx for replying Iain17 but that loop in there, just causes my program to freeze up. any other ideas anyone?