Oracle
Search Site  
Find
 
Crystal Ball Home
Oracle Home
Information On
   Web & Live Events
   Six Sigma & DFSS
   Education Alliance
   Training Classes
   Conferences & Forums
   Available Languages
 
Quick Links
   Shop
   Download
   Newsletters
   Contact Us
 
 
Worldwide Offices
   United States
   United Kingdom
   Germany
 
 
 
 

How do I use the Developer Kit to call Crystal Ball from Visual Basic Applications?

The following section was inadvertently left out of the Developer Kit User Manual , Version 2.1.

Calling Crystal Ball from Visual Basic for Applications (VBA) programs

To call Crystal Ball macros from VBA programs, you must first make sure that the following two conditions are true:

  • Crystal Ball must be running.
  • The VBA program must have a reference to Crystal Ball.

To create a reference to Crystal Ball from your program, follow these steps:

  1. Open the module with your VBA program.
  2. In the menu, select Tools/References.
  3. Check CB.XLA.
  4. Click on OK.

If you don't create a reference to CB.XLA, Crystal Ball macros will not be visible from your VBA program.

If you want your program to automatically load Crystal Ball, you should launch Crystal Ball from your Auto_Open subroutine. Do the following:

Sub Auto_Open()
If ExecuteExcel4Macro("ISERROR(CB.Normal(1,1))") Then
CB.Auto_Open
End If
'Your initialization code here
End Sub

This will check to see if Crystal Ball is already loaded; if it is not loaded, this routine loads it. If you do not include the above procedure, be sure that Crystal Ball is loaded when you call its macros.

 
Home | Products | Services | Industries | Applications | Support | About Us | How to Buy
Privacy Policy | Trademarks | Copyright © 2007, Oracle and/or its affiliates. All rights reserved.