Public Sub DelAddress()
    Dim oInds As CEAIndividualRecords
    Set oInds = New CEAIndividualRecords
    oInds.Init FE_Application.SessionContext
   
    Dim oFilter As cEAIndividualFilter
       
    Set oFilter = oInds.FilterObject
   
    oFilter.CustomFilterProperty(CUSTOMFILTERTYPE_CUSTOMWHERE) = "EA7INDIVIDUALSID = 37"
   
    Dim oInd As CEAIndividualRecord
   
    Dim oAdd As IBBAddressHeader
   
    For Each oInd In oInds
   
        Debug.Print oInd.Fields(EAINDIVIDUALS_fld_NAMEFORDISPLAY)
       
       
        For Each oAdd In oInd.Address
       
            Debug.Print oAdd.Address.Fields(ADDRESS_fld_ADDRESSBLOCK)
            Debug.Print oAdd.AddressOptions.Fields(ADDRESSOPTIONS_fld_ADDRESSLINKSID)
           
            If oAdd.Address.Fields(ADDRESS_fld_ADDRESSBLOCK) = "Test" Then
                oInd.Address.Remove oAdd
            End If
       
            Set oAdd = Nothing
        Next oAdd
       
        oInd.Save
       
        oInd.CloseDown
        Set oInd = Nothing
    Next oInd
 
    oInds.CloseDown
    Set oInds = Nothing
End Sub

Blackbaud provides 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 that you are familiar with Microsoft Visual Basic and the tools used to create and debug procedures.  Blackbaud Customer Support can help explain the functionality of a particular procedure but they will not modify, or assist you with modifying, these examples to provide additional functionality.  If you are interested in learning more about VBA and API modules, contact our Sales department at solutions@blackbaud.com.