Is it possible to run more than one Document_Open event upon opening?
For example, a message box before a userform.
If so, what is the code?
Is it possible to run more than one Document_Open event upon opening?
For example, a message box before a userform.
If so, what is the code?
You can run any number of commands from Document_Open. It is essentially just a macro that runs when a document is opened, saved in the ThisDocument module of the document. At its simplest -
The fact that you are opening a userform when the document is opened suggests that you are reusing a document. I would recommend that you use instead the Document_New event and save the document as a template from which new documents are created.Private Sub Document_Open() MsgBox "This is a message" UserformName.Show End Sub
Graham Mayor - MS MVP (Word) 2002-2019
Visit my web site for more programming tips and ready made processes
http://www.gmayor.com
Awesome.
Appreciate the quick reply.