I received a question recently from Markus asking for help. He was new to developing code with the VBA module in The Raiser’s Edge and had a good idea but didn’t know how to make it work
Hi David, I am new to both Raiser’s Edge and VBA and am currently attempting to writing a simple plug-in in VBA. The purpose of the plug-in is to inform the current user accessing the Constituent Form, that they have marked a Constituent as deceased but without a Deceased Date. I have already created the VBA macro, which I have executed for several Constituent records. However, I am not sure how to link the VBA macro to the Before Save Event that is the plug-in will execute when the “Save and Close” button clicked. I would like this in place in order for users to continue with their day to day process without clicking on the macro in order to be sure they have not save a Deceased Constituent without a Deceased Date.
To do this you need to log in as the Supervisor user. In the VBA module go to system project. In the VBA module there is a button which says RE Code Wizard.
If you go into the wizard you will see a whole load of different methods that you can create which will capture events fired by RE. If you go down to the constituent branch and find the constituent_beforesave.
When you come out of the wizard there will be a new method in your code that you can put your code into. When the constituent is saved your code will be triggered.