- Open re7vba.exe, located in the [PATH]\RE7 .
- Create a new project
- 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
Dim oUI As IBBMiscUI
Set oUI = reService.CreateServiceObject(bbsoMiscUI)
'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
Set oUI = Nothing
- 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"
This code will fire the message box "After Save" After the constituent has been saved.
- 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.
- Now you need to register the .DLL go to start and run, type:
- The next time you access Raiser's Edge the code in the DLL will run.
- The DLL will need to be installed and registered on each workstation.
- DLL macros can be difficult to debug.
- 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.