Simulation Modeling and Analysis with ARENA

Appendix B: VBA in Arena

OVERVIEW

Arena interoperates with two Microsoft technologies that are designed to enhance desktop applications. The first, Active X Automation, provides control facilities within and across applications via a framework platform that is accessible through a programming language. The second technology, Visual Basic for Applications (VBA) is a programming language, available in the Arena environment for writing procedural, code to supplement Arena's visual programming facilities. Procedural programming implements complex algorithms far more efficiently than visual programming, but the latter is easier to use. Using VBA, the user can also exploit the integrative capabilities afforded by Microsoft technologies, and readily interact with such popular applications as Excel, Visio, etc., which are supported by Active X Automation.

The VBA programming environment can be accessed in Arena from the Tools menu by selecting the Macro option and then the Show Visual Basic Editor option. This action opens a separate window that hosts the VBA code, forms, debugging interface, and access to help. Here, the user can write various types of VBA code:

  1. The user can provide event processing code that is executed in response to the occurrence of Arena events.

  2. The user can also provide general-purpose code that executes in special Arena blocks, called VBA blocks. The VBA code in a VBA block is executed whenever an entity enters the block. Following execution, the entity exits the VBA block and proceeds to traverse the model in the usual way.

  3. Finally, the user can write code to...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Integrated Development Environment (IDE)
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.