kynn, your profile says you are using VB2005. That is VB.Net, and is very different to VB6 and earlier (which is what the code here and in my tutorial are for).

For the kind of thing you need, take a look at the .Net articles in the third post of our Office Development FAQs (at the top of the Office Development forum)

If you need any help, it would be best to post a new thread in our VB.Net forum, or if interacting with Excel you could post in our Office Development forum instead.