A very handy way of getting an idea of the code you need is to do what you want while recording a macro. Then you can look at the code that was generated. About half way down this link in the "How do I write code to … ? [a.k.a. recording macro's]" section is an explanation.

http://www.vbforums.com/showthread.p...6-(or-VB5-VBA)