Should be quite simple to achieve.
Have a look at this website for starters:
http://www.cpearson.com/excel/vbe.htm
RBS
"mrl" wrote in message
...
I have hundreds of spreads with the same code. Is there an easy way to
update the code in all of them, without having to manually edit each one?
It would be nice if this could be done automatically, i.e. have a template
which contains the latest code, and when a spread was opened, the spread
would look at the date when the template was changed, and if it was
changed since the last time the spread was opened, then the spread would
automatically input the new code from the template.
However, this requires a way in VBA to delete a code module and replace it
with a module from another excel file. Is this possible? Thanks. - Mark