I cannot see from your post that you have only one Sub OpenDoc in the whole code module - all I can see is what you've posted. The simple fact is that the error message only occurs because you have more than one such sub.
Perhaps you would care to attach the affected document to a post with some representative data (delete anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab.
Please also make sure your code is properly formatted when you post it, by previewing the post.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|