title: Excel 2013 VBA opening multiple windows for a single workbook
body: <p>Problem:
  When I use excel vba to open multiple excel windows for a single workbook, excel freezes when I try to open the name manager. This behavior does not happen when I use the same code in the 2007 version of excel.</p>
  
  <p>I don't have any add-ins turned on, and this problem doesn't happen if I open multiple windows manually for the same workbook. I also ran a repair of the 2013 version of office to ensure it was not corrupted.</p>
  
  <p>I assume there is something wrong with my code which is causing the problem. I am not seeing what the issue is, and was hoping someone here might be able to tell me if there is a problem with my code. The code runs with no issues, the problem occurs after the windows are open and I try to open the name manager. </p>
  
  <p>I ran the code through the debugger (stepped through it) and it completed without any errors. I also made sure that there were no external link references that might be causing issues.</p>
  
  <p>Environment:</p>
  
  <ul>
  <li>Windows 7</li>
  <li>Microsoft Office 365 (2013 version)</li>
  </ul>
  
  <p>Code:</p>
  
  <pre><code>Option Explicit
  Global glbWkBkName As String
  '---------------------------------------------------------------------------------------
  ' Procedure : InitWindows
  ' Author    : Ron
  ' Date      : 6/7/2015
  ' Called By : Workbook_Open
  ' Purpose   : Sets up 3 windows upon entering the workbook. Provides a view of 3 sheets
  '             used while entering data. The middle sheet is where data entry is performed,
  '             the left sheet provides reference information on the data being entered,
  '             and the right sheet provides summary information about the data entered.
  '---------------------------------------------------------------------------------------
  '
  Sub InitWindows()
      Dim wnWin As Window
  
      On Error GoTo InitWindows_Error
  
      glbWkBkName = ThisWorkbook.Name
  
      Application.ScreenUpdating = False
  
      'Get rid of all open windows to start at 1.
      'Easier than determining which windows are open and processing them.
  
      Do Until Windows.Count = 1
          Windows(Windows.Count).Close
      Loop
  
      'Create 2 more for a total of 3 windows.
      ActiveWindow.NewWindow
      ActiveWindow.NewWindow
  
      For Each wnWin In Windows
          Select Case wnWin.WindowNumber
                  'Left window: SkillTreeLayout
              Case Is = 1
                  wnWin.Activate
                  Sheets("SkillTreeLayout").Select
                  With wnWin
                      .WindowState = xlNormal
                      .Top = 6
                      .Left = 6
                      .Width = 514
                      .Height = 627
                      .DisplayGridlines = False
                  End With
              Case Is = 2
                  'Middle window: DataEnry
                  wnWin.Activate
                  Sheets("DataEntry").Select
                  With wnWin
                      .WindowState = xlNormal
                      .Top = 6
                      .Left = 530
                      .Width = 698
                      .Height = 627
                      .DisplayGridlines = False
                  End With
              Case Is = 3
                  'Right window: DataEntrySummary
                  wnWin.Activate
                  Sheets("DataEntrySummary").Select
                  With wnWin
                      .WindowState = xlNormal
                      .Top = 6
                      .Left = 1230
                      .Width = 200
                      .Height = 627
                      .DisplayGridlines = False
                  End With
          End Select
      Next wnWin
  
      Debug.Assert glbWkBkName &lt;&gt; ""
      Set wnWin = Windows(glbWkBkName &amp; ":2")
  
      Windows(glbWkBkName &amp; ":2").Activate
  
      'Debug.Print glbWkBkName &amp; ":2"
      'ClrSkillTreeCharData
  ExitProcedure:
      On Error Resume Next
      Set wnWin = Nothing
      Application.ScreenUpdating = True
      Exit Sub
  
  InitWindows_Error:
      Call UnexpectedError(Err.Number, Err.Description, Err.Source, _
      Err.HelpFile, Erl, "InitWindows")
      Resume ExitProcedure
  End Sub
  </code></pre>