Moved From The CodeBank (which is for sharing code rather than posting questions )

You posted this in the VB6 Codebank, but it is clear from your example code that you are not using that version, but, rather, VB.NET

What version of VB.NET are you using? 2008? 2010? 2012? Earlier?