Can I execute an SVB program from within other Visual Basic compatible applications?
Yes. In general, because of the industry standard compatibility of Statistica Visual Basic, you can execute Statistica Visual Basic programs from any other Visual Basic compatible environment (e.g., Microsoft Excel, Microsoft Word, or a stand-alone Visual Basic language; in practice, you would typically call Statistica functions from VB in another application). However, there are a few considerations and limitations that you need to be aware of:
Statistica libraries must be properly licensed and installed. When you run a Statistica Visual Basic program or attempt to call Statistica functions from any other application, all calls to the Statistica specific functions (as opposed to the generic functions of Microsoft Visual Basic) will be executed only if the respective Statistica libraries are present on the computer where the execution takes place - that is, the user of the program must be a licensed user of the respective Statistica libraries of procedures. Note that this large library of Statistica functions (more than 11,000 procedures) is transparently accessible not only to Visual Basic (either the one that is built in, or a different one), but also to calls from any other compatible programming language or environment, such as C/C++, Java, or Delphi.
The proper Statistica libraries must be loaded. In order to access the thousands of library functions available in Statistica, the respective object reference libraries must be loaded. For example, in Microsoft Excel, use option Tools - References and then select the Statistica Object library, and any other libraries that you want to access.
The Statistica Application object must be explicitly created. When you run Statistica Visual Basic programs from within the Statistica program editor, then a few shortcuts are available. In particular, the Statistica program editor assumes that the current application is Statistica, so it doesn't have to be initialized. However, when running Statistica from within another application (e.g., from within the Microsoft Excel Visual Basic editor), you have to explicitly declare the Statistica Application object; see also What is meant by the term "object model?".
- Some other limitations and differences between SVB and Visual Basic in other applications
- While the objects of the Statistica libraries are fully exposed and accessible to all compatible Visual Basic programming environments in other applications, there are a few functions that are available only in SVB, i.e., when the Visual Basic program is run from within Statistica. (Likewise, there are some functions in other applications that are not accessible in the SVB environment.) Specifically, all user interface functions, such as user-defined dialogs or functions for retrieving variable lists or value lists (via dialogs from the user) are closely tied to the Statistica application itself. Therefore, when designing a Visual Basic program to run from a "foreign" application (e.g., from within Microsoft Excel), it is best to design the user interface (dialogs) using the tools available in that application; those tools are usually designed such that they allow you to program interfaces with an overall look and feel that makes them compatible with all other interfaces (dialogs) used in the respective application.