I have done this in C++, but I will try and translate some of it into vb for u