modify code ...using code.

modify code ...using code.

Post by Margaret B » Thu, 08 Jul 2004 07:40:15


There is a Module object.

A Module Object is a member of the Modules collection, and
uses the standard Access syntax. You can look at the
properties and methods in the Object Browser.

One of the Module methods is InsertText, which inserts lines
at the end of a module, probably most suitable for adding a
procedure.

The InsertLines, ReplaceLine, and DeleteLines are for
modifying the lines in the middle of the module.


If the module is attached to a form or report, you will have
to have those forms and reports open in design mode, but you
can do that in code, and make them invisible, so the user
doesn't get confused.

I don't have any code to give right now, but you can look it
up on line, once you know it's there



code using code... In this way it will be possible to use
patch to modify applications instead of having to do a new
release.
 
 
 

modify code ...using code.

Post by M.L. Sco S » Thu, 08 Jul 2004 09:24:45

The short answer is yes.

The long answer is that it is not for the "faint-of-heart" because of the
weak documentation.

First set a reference to the "Microsoft Visual Basic for Applications
Extensibility 5.3" library.

Then look for "Visual Basic Add-In Model" in the VBA help.

There are a few one-line examples scattered around.

If you search the MS KB at
http://www.yqcomputer.com/ ;EN-US;KBHOWTO for "vba
extensibility" without the quotes, you should get back around 32 hits.
Scattered in that list, you'll find a few samples of Excel and Word code
that you can learn from and apply the techniques.

It's just going to take some experimentation.

Good luck.

Sco



In this way it will be possible to use patch to modify applications instead
of having to do a new release.