About Sample Macros

Sage 300 comes with several Visual Basic (.avb) macros and one Excel macro that you can use or adapt for your own company.

Before you can run these macros, you must:

  • Edit the macros to change the database, user ID, and password.
  • Have installed a program that includes Microsoft Visual Basic for Applications, such as Microsoft Office.

You can add icons for these macros to your Sage 300 desktop, where they are easily accessible.

For instructions on adding icons for Excel macros, see Add a Shortcut for an Excel Macro to Your Desktop.

For instructions on adding icons for .avb macros, see New Object.

Click the following links for information about each sample macro:

  • Budget.xls

    Budget.xls is an Excel-based spreadsheet with a macro that extracts budget information from General Ledger for review and editing. You can then export the updated budgets back to General Ledger.

    For step-by-step instructions on running this macro, see Create a Budget Worksheet Using the Budget.xls Macro.

  • BAS.avb

    This macro helps you to complete and submit a printed or electronic Business Activity Statement for filing in Australia.

    For step-by-step instructions on running this macro, see File an Australian Business Activity Statement Using the BAS Macro.

  • Cashflow.avb

    The Cashflow macro ages receivable and payable transactions according to aging periods and for the cash accounts you specify. It then produces a multi-worksheet Excel workbook with cash flow projections that include account balances and the cash available at the end of the specified cutoff period. If you require additional information about your receivables or payables balances, you can drill down to the transactions.

    Also, using the pivot tables created by the macro, you can sort, include additional levels of detail, and subtotal the transactions using up to nine different options.

    You can also graph the aged transactions so that you can easily determine which customers or vendors you need to review. (You should remove the total from the graph, as it is the sum of all transactions).

    For step-by-step instructions on running this macro, see Project Cash Flows Using the Cashflow Macro.

  • Oeordact.avb

    The O/E Order Action macro comes with Sage 300 Order Entry. You use it to produce a dynamic Order Action report in Microsoft Excel.

    For step-by-step instructions on running this macro, see Using the Order Action Macro to Create an Order Action Report in Microsoft Excel.

  • Reverseinvoice.avb

    The Invoice Reversal macro creates a credit note return for a specified invoice, and then creates a new shipment. You could use this macro to "reverse" the effect of an invoice that was processed incorrectly the first time.

    Note: Before running this macro, make sure that the invoice has been processed by Day End Processing.

    For step-by-step instructions on running this macro, see Using the Order Entry Invoice Reversal Macro to Create a Credit Note Return and a New Shipment.

  • GetRates.avb

    This macro retrieves exchange rates from the Pacific Exchange Rate Service into Excel 2003 or 2007, and then updates the currency rate tables in Common Services.

    For step-by-step instructions on running this macro, see GetRates Macro.