If you want to do anything with or to an instance of a class, the first thing you should do is read the help/MSDN topics for that class and it's member listing. That would have brought you to the Close method pretty quickly, and it would give you a code example. If you don't understand what it says, that's the time to look elsewhere.