The IBBMacroProperties interface promised some nice enhancements to VBA macros. However of the three properties in the interface only one of them actually works.
When you write a VBA macro you can use a parameter signature that Raiser’s Edge picks up on and then places the macro in dropdown on each record. The parameter signature must be in the following format:
Public Sub myMacro(oDataObj As IBBDataObject)
You can put anything in the procedure and work with the data object anyway. The oDataObj object can be any object that implements that interface. Since the macro is accessed from the record screens it can be any of the top level records. Clearly if your macro is due to only work with constituents then you have to check that the IBBDataObject is a constituent and not a gift or a fund.
The property SupportedMetaObjects fixes this problem (this is the property that works). You can use this property to specify this this macro should only work with constituents. Once that is done it will not appear in a drop down in any other window, only the constituent record window.
The image below shows what you can expect when you do see your macro on the constituent record:
As you see from the image above the macro button is functional but not pretty. That may be fine for some users but wouldn’t it be better to customise the image and get rid of the very geeky name.
The other two methods in the interface; Description and ImageFilePath were supposed to do this. As their names suggest you would be able to make the whole process somewhat more user friendly and make your macro much more a part of The Raiser’s Edge than it appears to be above.
1 thought on “IBBMacroProperties – A very useful interface if it worked”
Thanks for the post…but unfortunately I am not able to get the SupportedMetaObjects to work. I would like my macro to only show up when a user is viewing a fund.
Here is what I have so far
Private Property Get IBBMacroProperties_SupportedMetaObjects(ByVal sMacroName As String) As Variant
Select Case UCase(sMacroName)
IBBMacroProperties_SupportedMetaObjects = Array(bbmoFUND)
Comments are closed.