The following rules govern the running order of macros:
If multiple workbooks are open, Crystal Ball searches the workbooks in the order of their priority. The priority number is set by the CB.SetCBWorkbookPriority macro. If this macro has not been called on the workbook, no workbook order is guaranteed.
CB.SetCBWorkbookPriority sets the running order for macros when multiple workbooks are open. For example, a workbook with order=10 will run before a workbook with order=20. CB.SetCBWorkbookPriority runs only at the workbook level and not at the worksheet level.
The definition of this macro is:
Public Function CB.SetCBWorkbookPriority (aPriority As Long)
A syntax example, used in a subroutine at the module level, is:
Application.Workbooks("Book1.xls").Activate CB.SetCBWorkbookPriority(10)
This example assigns a priority of 10 to the workbook Book1.xls.
Within each workbook, macros on worksheets run in left-to-right sheet order in the workbook provided there are no macros at the workbook level. If there are macros at the workbook level, macros in that workbook at the worksheet level do not run.
If there are no Crystal Ball data cells in a workbook, no macros run against it.