View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
John Wilson John Wilson is offline
external usenet poster
 
Posts: 550
Default Distributing code

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

Andy Reed wrote:

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?