At the top of the code window, above all other code, do you see the words "Option Explicit"? If not, add these words and press F8. Your error, when you compile, should now be highlighted. Now, in the future so that this appears automatically, goto VB's menu Tools>Options and when the dialog appears, place a check next to where it says "Require Variable Declaration". Click OK.
Good Luck
Reputation Points: 156
Solved Threads: 296
Posting Virtuoso
Offline 1,670 posts
since Mar 2009