Distributing code

  • Thread starter Thread starter Andy Reed
  • Start date Start date
A

Andy Reed

Hi,

I have sent out a workbook to a few friends via email
which contains various subroutines. The actual subroutine
is a 'Before Close' routine. I need to change the code in
just this subroutine. Is there a neat way to send just
the newly amended subroutine to this group but not have
to send out the whole amended workbook. The reason being,
that each of the Users has different data in the same
workbook template so I don't want to have them start over
again.

What I really need is a program that will update their
workbook and change the code in just this one subroutine.

Any ideas?
 
Andy,

Chip Pearson has some examples of how to manipulate VBA
code. Should give you a start.

http://www.cpearson.com/excel/vbe.htm

I've run into the dilemma that you're in myself.
As such, I never code anything into a workbook event other
than a call to a sub in a regular module. The regular
module contains all of the code that would normally have gone into
the event. In that way, anytime I need to modify the workbook, it's
only a matter of deleting and importing the desired module. It also
makes it a lot easier to test.

John
 
Back
Top