Loui,
The Edit button is dimmed when the macro selected isn't
in the Normal template (or the template you have open,
if any). This isn't 'hiding' it per se; it just means
it can't be edited from that dialog under those conditions.
If the user can open the template containing the macros,
he/she can edit it if the project isn't protected.
If you want users to be able to run macros from the macro
dialog but not edit them, you must protect the project
that contains them (the whole project, can't do just a
portion). If you *don't* need them to be able to run
these macros from the macros dialog (for example, if you
can assign them to custom menu items or toolbar buttons),
you can declare them as Private procedures (just put the
word 'Private' before the 'Sub') and they won't appear
in the dialog and thus won't be editable or executable
from there, but can still be run from custom controls.
But I must strongly echo Doug's comment. Allowing users
who aren't thoroughly acquainted with macros to edit them
directly is a bit like giving a blowtorch to a 4-year-old.
If you need to let the user change a parameter, tbere are
cleaner ways to do that. One is to use an InputBox in
the code to prompt for the parameter, and once it is
supplied, store it in a text file (I like to use the
System.PrivateProfileString feature for this) from which
it will be retrieved the next time the macro is run and
offered as the default for the prompt. (This may sound
complicated and high-overhead but is truly trivial to
Word.) The text file can contain several parameters.
Tons of common programs use this method. To see examples,
take a look at any of the (likely dozens of) files in your
Windows folder whose names end with ".INI".
Post back with a sample parameter and relevant code from
your macro and I'll post an an example of how to arrange
this.
Slightly less elegant, and slightly more error-prone, is
to let the user edit that text file instead. The main
advantage here is that you could dispense with the prompt,
so the macro would always run with the parameter in the
text file, never asking the user to confirm or change it.
Please don't do it the way you're pondering.