Shrivallabha has provided some good direction. I would think that you would want to try some things used in: http://www.rondebruin.nl/notes1.htm

I would recommend that you use early binding methods as previously recommended. This makes it easier to program but makes no significant difference otherwise. The method at Ron's site uses late binding. I commented on how to do the early binding in: http://www.vbaexpress.com/forum/showthread.php?t=16109

To get more help here, I suggest that you post the full code so that we can test.