This example returns the current setting (True or False) for the preference "Bring Microsoft Excel 2007 to the foreground while running Normal speed simulations (faster)" in the Normal Speed options dialog, accessed manually by choosing Normal Speed on the Speed tab of the Run Preferences dialog and then clicking the Options button. When set to False, simulations in Microsoft Excel 2007 might run more slowly than if the preference were set to True (the default).
CB.GetExcel2007ForegroundMode()