Thank you both for your help but as badley has also amended some other code for me i will stay with it and with him but i tried your demo and its doing what i want but now i have put your code back into my original file its not working how are you referencing what was textbox 10 in your demo list box1 as i have now removed textbox 10 and put a list box there which as i already have a list box in named listbox 2