Apologies everyone. There's something strange with my visual studio with win2k. I recompiled with a different machine (98) and it all works fine now. At least the debugging made me have a good look at the code..... Angus