Have a look at the documentation provided by Microsoft. Yuo should be able to find an answer to your question there:
http://support.microsoft.com/kb/301982[
^]
If you have any more questions regarding Excel you should just start a record macro, do the things you need to do, and stop the macro. If you look at the code it should be straight forward to implement it in VB.NET.