Using Visual Basic Macros

System Manager provides full support for Microsoft Visual Basic for Applications (VBA), allowing Purchase Orders to integrate smoothly with Microsoft’s entire Office suite.

You can record, edit, and run VBA macros from within Sage 300. You can also continue to run VBA macros for another application that includes VBA (such as Microsoft Excel).

Purchase Orders comes with a workflow macro that lets employees enter purchase requests that can be sent as e-mail attachments to managers for approval or rejection. The macro creates purchase orders for approved requests.

The workflow macro consists of:

To run a macro:

  1. On the Sage 300 Desktop, click Run Macro (in the Macros section of the ribbon).

    The Run Macro screen appears.

  2. In the Files Of Type field, select VBA Macro Files.
  3. Double-click the macro you want to run.

To add an icon for a macro to your desktop:

  1. On the Sage 300 Desktop, select (highlight) Purchase Orders, and then click Object > New > Macro.
  2. In the Title field, enter a title for the macro, such as Requisition Request or Requisition Approval.
  3. Click Next.
  4. Click Browse, and then select the folder and the macro (for example, {installation path}\macros\workreq.avb).
  5. Click Finish.