Here's a couple. Use the search function and search for programatically

http://vbaexpress.com/kb/getarticle.php?kb_id=274

http://www.vbaexpress.com/forum/show...rogramatically