Jim -
When you are looking inside the VBE window, you should see several windows.
There is one which is typically located on the left which is the Project
Explorer. If you will turn that on, I think things will start explaining
themselves to you. (From the View menu, select Project Explorer - or CTRL
+R). If you have your Memorandum.dot template open, you will see it listed
as well as the Normal.dot project. If you simply record a macro using the
recorder, the macro will default to the Normal.dot project. Word sets it up
so that if a Module is not already created, then Word will create a new
Module (container) to hold the macro. It is called NewMacros by default.
All documents / templates are always based on the Normal.dot template at
sometime. Once you create a new template, then new documents can be based
off of them. Think in terms of a piece of paper that you have drawn on. The
paper is always there. When you take the paper to the copier, and make a
copy, the new copy has the drawing on it. Now it is a separate piece of
paper that you can continue to draw on, but the base paper is always there.
You can make new copies of the new drawing (Which would be another template)
or you can revert to the original copy (Memorandum template)
The code that I gave you should sit behind the UserForm that you need to
include in the Memorandum template. So, make sure you have the Memorandum
Project selected in the Project Window, and from the Insert Menu, select User
Form. Once you have the UserForm displayed, the control toolbox will
display, and placing objects on the form is just like VB.
In the project window, you will see a folder called Forms, which when you
expand it, you will see the Form you just created. To modify how the FORM
itself works (Caption, Name, Scroll Bars, etc.) then you will want to display
an additional window called the Properties window. (View, Properties Window
- or ALT + F4). The properties window will also allow you to set the
properties associated with the various controls which you have placed on the
form. Select the Combo Box, and the properties window will display those
properties available to you for the combo box. To start, leave all the
properties set to default EXCEPT the name of the object. ComboBox1 is not
very descriptive. <smile>
Once you have your OK button on your form, if you double click on the
button, it will take you to the code window for the button itself. Your
cursor will be defaulted to the OnClick event for the button.
To test your form, you can make sure that your form is in view, and press
the F5 (Run) key, or on the standard toolbar you will see a right pointing
triangle which will allow you to run the form. At that point you can test to
see whether your combo boxes have properly initialized by seeing whether you
have values in them.
Once you save your Memorandum template, your form & code will be saved as
well. However, depending on the version of Word you have and the Security
Level you have Word set to, you may have trouble re-opening your template and
getting your code to run again. If you set your security down to Medium,
when you open the template, or base a new document on the template, you may
be prompted to enable the macros. Once you get things going in development,
if you are going to share with others, you may want to consider signing your
code so that once your users have "trusted" you, they will no longer get the
question even if security is set to High.