The VBA DLL tool is used to create event driven macros which can operate like the ActiveRecords in VBA.  The DLL tool creates a compiled version of event driven macros so they do not have to have be coded in the database (which is where VBA stores code in The Raiser's Edge 7).

  1. Open re7vba.exe, located in the [PATH]\RE7 .

  2. Create a new project

  3. Write the program

The following example code will allow Events to fire for gifts and constituents. Insert this text below the Add your macro code below this line at the bottom of the prepared code.

Public Sub UserInterface()


   Dim reService As REServices

   Set reService = New REServices

   reService.Init REApplication.SessionContext


   Dim oUI As IBBMiscUI

   Set oUI = reService.CreateServiceObject(bbsoMiscUI)


   With oUI

       .Init REApplication.SessionContext

       'This line will allow Active gift events to fire

       .ShowUIForDataObject bbdataGift, GIFT_fld_ID, True

       'This line will allow Active Constituent events to fire

       .ShowUIForDataObject bbdataConstituent, RECORDS_fld_ID, True


   End With

   Set oUI = Nothing



End Sub

  1. Now insert the code for each event. Select the drop-down option of(General). The options to select will appear, i.e. Active Action, Active Gift, etc. Select the Record type that you are working with. To the right the option to select a specific Event is available, for example the AfterSave event. The code might look like this:

    Private Sub ActiveConstituent_AfterSave(oRecord As Object)

       MsgBox "After Save"

    End Sub

    This code will fire the message box "After Save" After the constituent has been saved.

  2. Once you have your code set up you must compile the DLL. Select File, Make DLL. You should create the DLL file in the RE7/Custom directory.

  3. Now you need to register the .DLL go to start and run, type:

    REGSVR32  [path]\RE7\Custom\dllname.dll

  4. The next time you access Raiser's Edge the code in the DLL will run.


  1. The DLL will need to be installed and registered on each workstation.

  2. DLL macros can be difficult to debug.

  3. The DLL should not just be deleted after testing it, as it will cause errors. It should be unregistered by going to start, run and type:

    REGSVR32  C:\Blackbaud Management Console7\RE7\Custom\dllname.dll /u

Disclaimer: We provide programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes you are familiar with Microsoft Visual Basic and the tools used to create and debug procedures. Our Customer Support can help explain the functionality of a particular procedure, but we will not modify, or assist you with modifying, these examples to provide additional functionality. If you are interested in learning more about the VBA and API modules, contact your account manager.