Public Sub Addcharge()

   Dim oCharge As CSBCharge

   Set oCharge = New CSBCharge

   oCharge.Init fe_application.SessionContext



   With oCharge


       With .Distribution.Add

           .Fields(BBDISTRIBUTIONS_fld_CREDITACCTNUM) = "01-4100-03"

           .Fields(BBDISTRIBUTIONS_fld_AMOUNT) = 50


           With .TransactionDistributions(bbTranDistType_Credit).Add


               .Fields(BBTRANSACTIONDISTRIBUTIONS_fld_AMOUNT) = 50

               .Fields(BBTRANSACTIONDISTRIBUTIONS_fld_CLASS) = "Unrestricted Net Assets"



               .Fields(BBTRANSACTIONDISTRIBUTIONS_fld_PERCENT) = 100

           End With

       End With

       With .PayerDistribution.Add

           .Fields(CHARGEDISTRIBUTIONS_fld_PAYERID) = 5

           .Fields(CHARGEDISTRIBUTIONS_fld_AMOUNT) = 50

       End With

       .Fields(SBCHARGES_fld_EA7RECORDSID) = 5

       .Fields(SBCHARGES_fld_CATEGORY) = "Flat Rate Item"


       .Fields(SBCHARGES_fld_DUEDATE) = "11/1/2005"

       .Fields(SBCHARGES_fld_EXTENDEDAMOUNT) = 50



   End With

End Sub

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.