title: Creating ActiveX ComboBoxes Locks Excel
body: <p>I have the following code that is intended to create a series of combo boxes on a worksheet. Since I cannot be in break mode when creating combo boxes I am struggling to find out what I am doing wrong.</p>
  
  <pre><code>Private Sub CreatePlayerSelectorComboBoxes()
      Application.ScreenUpdating = True
      Dim currStatusBarMgr As StatusBarManager
      Set currStatusBarMgr = New StatusBarManager
      currStatusBarMgr.MessagePrefix = "Creating Control: "
      With MatchesTeamPlayersWS
          .Range(.Cells(17, 1), .Cells(17, .UsedRange.Columns.Count)).ClearContents
          Dim matchCounter As Long
          For matchCounter = 1 To 6
              Dim controlColumnMatch As Long
              controlColumnMatch = ((matchCounter - 1) * 24)
              Dim matchText As String
              matchText = "M" &amp; matchCounter
              Dim teamCounter As Long
              For teamCounter = 1 To 2
                  Dim controlColumnTeam As Long
                  controlColumnTeam = ((teamCounter - 1) * 12)
                  Dim teamText As String
                  Select Case teamCounter
                      Case Is = 1
                          teamText = "TmA"
                      Case Is = 2
                          teamText = "TmB"
                  End Select
                  Dim positionCounter As Long
                  For positionCounter = 1 To 4
                      Dim positionText As String
                      positionText = "P" &amp; positionCounter
                      Dim controlText As String
                      controlText = matchText &amp; teamText &amp; positionText
                      Dim currDivAControlName As String
                      currDivAControlName = "DivA" &amp; controlText
                      Dim currDivBControlName As String
                      currDivBControlName = "DivB" &amp; controlText
                      Dim controlColumnPosition As Long
                      controlColumnPosition = 3 + ((positionCounter - 1) * 3)
                      Dim controlColumn As Long
                      controlColumn = controlColumnMatch + controlColumnTeam + controlColumnPosition
                      Dim controlCell As Range
                      Set controlCell = .Cells(17, controlColumn)
                      currStatusBarMgr.PostStatusBarUpdate (currDivAControlName)
                      Debug.Print currDivAControlName
                      Dim controlDivA As Variant
                      Set controlDivA = .OLEObjects.Add(ClassType:="Forms.ComboBox.1", _
                                          Link:=False, _
                                          DisplayAsIcon:=False, _
                                          Left:=controlCell.Left, _
                                          Top:=controlCell.Top, _
                                          Width:=140, _
                                          Height:=24)
                      controlDivA.Name = currDivAControlName
                      currStatusBarMgr.PostStatusBarUpdate (currDivBControlName)
                      Debug.Print currDivBControlName
                      Dim controlDivB As Variant
                      Set controlDivB = .OLEObjects.Add(ClassType:="Forms.ComboBox.1", _
                                          Link:=False, _
                                          DisplayAsIcon:=False, _
                                          Left:=controlCell.Offset(0, 144).Left, _
                                          Top:=controlCell.Offset(0, 144).Top, _
                                          Width:=140, _
                                          Height:=24)
                      controlDivB.Name = currDivBControlName
                  Next
              Next
          Next
      End With
      Application.ScreenUpdating = True
  End Sub
  </code></pre>
  
  <p>If I comment out the parts that are intended to create the combo boxes the code runs. I have inspected the Set assignments and they appear to be syntactically correct. I have also made sure the names are unique.</p>
  
  <p>I have let Excel run and run.. All I get is [running]... until I force-quit Excel.</p>