Thanks. Can you give me an example of what you mean by a native UI
event, so I understand just what you mean?
Well, if you open up the ThisDocument module, you'll see in the upper-left a
dropdown that contains "(General)" and "Document" -- select the latter. Now
the upper-right dropdown offers you three native events: Close, New, and
Open. These events allow you to react to when that document is closed,
created (obviously, this would be template-based code, in this case), or
opened. If you were to add controls directly to the document, events for
those would also be fired within this module.
The use of "native" implies non-native as well, doesn't it? By that, I
really meant events generated by things you add to the project, such as
userforms or controls hosted by userforms. The code for those should
typically be contained within the respective userform module. Again,
generic event handlers (such as one that would select all the text within a
textbox) can be moved into more generic/standard code modules.
Then there are events raised by objects other than ThisDocument, such as
Application. Those would most typically be coded up within class modules,
though I suppose it could be arguable in some rare cases that they more
appropriately belonged within the document.