RE-Decoded

A technical look at the Raiser's Edge API from Blackbaud

VBA: Inside or Out?

January 29th, 2007 by David Zeidman

If you are using VBA to perform actions on opening, saving or deleting record you have the option of putting the code in two different places.

Perhaps the most obvious is when you log in to RE as supervisor you can go into the Visual Basic for Applications environment (found under the Tools menu) and capture your events in the System project. This is the “inside” solution as it resides inside the database and can be programed from inside the RE application.

The other option is to use the RE7VBA tool. This executable is found in the Raiser’s Edge directory along side RE7.exe. Running this program opens up a similar environment except that you can save your work in a file and compile it to a DLL. This is the “outside” solution for opposite reasons

What are the pros and cons of each?

  • Writing code on the “inside” is available immediately for everyone. This is a good and bad thing. This works well for simple business rules that should apply to everyone always. It also means that any mistakes will affect everyone too. Writing on the “outside” means that some users can have some customisations but not others.
  • On the inside – You only need to install it in one place, you only need to update it in one place. Outside solutions need to be installed on each PC which can be a challenge for a large organisation.
  • All code on the inside must reside in the same place. It is possible that you have conflicting code. Code that does different things and must be ordered for it to work. It also means that when you update the code you need to be careful you do not affect other items. Whereas code written outside can be split functionally.
  • Code written for modal modules (such as import) can be debugged (sometimes – see next point) when developed on the outside whereas you cannot set break points when developing on the inside.
  • There are instances where debuging on the outside solution crashes! These are known bugs (e.g. BB260636 and BB233120).

For development purposes my preference (despite the known crashes) is the outside method. Being able to step through import process is a real bonus and makes the whole process much more manageable.

Related posts:

  1. Replacing Excel Most of the Raiser’s Edge users that I speak to...
  2. Integrating Raiser’s Edge with non-Blackbaud Products A lot of the work that I do involves the...

Posted in Beginner | 5 Comments »

5 Responses

  1. RE-Decoded » Blog Archive » The problem with imports Says:

    [...] before then it is worth while using it as there are various benefits to using it as outlined in my earlier post. The VBA DLL tool is found in the same directory as the RE7.EXE file, most likely C:Program [...]

  2. VBA vs VBA (VB .Net) dlls - best practices for deployment - Blackbaud User Society - Forum Says:

    [...] is a good question and one that I went some way addressing in a blog post: RE-Decoded ? Blog Archive ? VBA: Inside or Out? . However I didn’t really cover much in the way of deployment. I would add this. If you create a [...]

  3. Victor Says:

    Hello David,
    We are experiencing that dll’s written with the RE7VBA tool is not running on certain databases.
    The case seem to be that it is not running when you use the DLL on a database that has VBA not enabled. Any experience with that?

  4. David Zeidman Says:

    Hi Victor,

    You are quite right. In order to be able to run a VBA script whether they are inside or out of Raiser’s Edge (i.e. written using the RE7VBA tool) you have to own the RE:VBA module. This is different from a plug-in where anyone can run them.

  5. RE-Decoded » Blog Archive » Accessing other parallel VBA DLLs in The Raiser’s Edge Says:

    [...] VBA code that fires when, say a constituent is saved, is to write a VBA DLL. I have covered this previously so I won’t go into details in this post. However what do you do if you need one VBA DLL to [...]

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.