| How
does Crystal Ball work with VBA and OLE applications?
OLE Automation
OLE Automation is
a protocol (set of rules) that lets one application control another
application. An OLE Automation client
is an application that can use OLE Automation to control an OLE
Automation server. An OLE Automation server
is an application that can be controlled by an OLE Automation
client.
Programming languages like Visual Basic (VB), C++,
DELPHI, or Visual Basic for Applications (VBA) support OLE Automation,
and you can use them to create OLE Automation servers or clients.
Excel is an OLE Automation server. Because Crystal
Ball is an add-in to Excel, it can respond to OLE Automation clients
through Excel. However, Crystal Ball itself is neither an OLE
Automation server nor a client.
VBA
Visual Basic for Applications (VBA) is a subset
of the Visual Basic language. It is integrated with Microsoft
Office products, such as Word and Excel, as well as other Windows
applications.
The Crystal Ball Pro Developer's Kit is a collection
of VBA macros that you can use to control Crystal Ball through
Excel.
NOTE: To control
Excel from within a Crystal Ball simulation, you can write a VBA
macro and then put the macro name in the Crystal Ball Run Preferences
dialog.
Calling Crystal Ball from an external application
To call Crystal Ball from an external application
(an application other than Excel), the application must be an
OLE Automation client.
- Call Excel (as an OLE Automation server) from
the application.
- Use Excel's Run command to run Developer Kit
macros to control Crystal Ball.
To do this, you must have programming skills, knowledge
of OLE Automation, and knowledge of how to use OLE Automation
from a programming language such as those listed above.
Calling an external application from Crystal Ball
To call an external application from Crystal Ball,
the application must be an OLE Automation server.
- Create a VBA macro (that is an OLE Automation client)
to control the application.
- Put the macro in the Crystal Ball Run Preferences
dialog.
To do this, you must have VBA programming skills,
knowledge of how to use OLE Automation from VBA, and in-depth knowledge
of the application being called.
|