Alright, here's what I want to do:

I have a main workbook whose 'close' event is fired when the "X" is pressed to close excel. At the time, the focus is on another workbook (opened via the first one with code)

I have tried and tried and tried but no matter what I do I either end up with:
The workbooks close IFF I'm focused on the main workbook
The main workbook won't close when focused on second workbook
(tried moving focus to first workbook first, no effect)
Excel crashes

Some code:
VB Code:
  1. On Error Resume Next
  2. Dim Wkb As Workbook
  3. Static Recurse As Boolean
  4.  
  5.     If Recurse Then
  6.         Exit Sub
  7.     End If
  8. 'temp code to stop bug
  9. 'preferably save and close the whole program or just that workbook
  10. 'grey bar shows up if just close that workbook
  11.     If WkbIntro.Name <> ActiveWorkbook.Name Then
  12.         MsgBox "timbrplans can only be closed from the intro page.", vbExclamation, "timbrplans"
  13.         Cancel = True
  14.         Exit Sub
  15.     End If
  16. 'sets updating, events to false, and status bar to "..."
  17.     Safety.SetSettings False, False, True, "Shutting Down..."
  18.    
  19. 'Just closing the program here, no real effect
  20.     CheckSystemData
  21.     Recurse = True
  22.     EnableKeys True
  23.     EnableMenus True
  24.     Application.Caption = "Excel"
  25.    
  26.     'Save and close all of our workbooks
  27.     'by checking if they are open
  28.     For Each Wkb In Workbooks
  29.         Select Case LCase(Wkb.Name)
  30.         Case "tbm_intro.xls"
  31.         Case "tbm_homes.xls", "tbm_swing.xls", "tbm_sheds.xls", _
  32.           "tbm_backyardorganizer.xls", "tbm_decks.xls", _
  33.           "tbm_Bunkie.xls", "tbm_estimator.xls", "tbm_garages.xls"
  34.             SaveMe Wkb
  35.             Wkb.Close False
  36.         Case Else
  37.             Cancel = True
  38.         End Select
  39.     Next Wkb
  40.    
  41.     SaveMe ThisWorkbook
  42. 'default settings for next excel run
  43.     Safety.RestoreSettings
  44.  
  45. 'if an unknown workbook was open, dont kill all of excel
  46.     If Cancel Then
  47.         Application.WindowState = xlNormal
  48.         ThisWorkbook.Close False
  49.     End If