The joys of ActiveX - try saving in an OnTime procedure instead:
Dim wbkReport As Workbook
Sub BeginProcess()
' On Error GoTo Error_Handler
Dim vbpProject As Object
Dim vbcComponent As Object
Dim codModule As Object
Dim lngLine As Long
Dim objOLE As OLEObject
Workbooks.Add
Set wbkReport = ActiveWorkbook
With wbkReport.Worksheets(1)
Set objOLE = .Shapes.AddOLEObject("Forms.ComboBox.1").OLEFormat.Object 'Add a combo box
objOLE.Name = "cbxMonth" 'Its inner name
.Range("A5").Value = "January"
.Range("A6").Value = "February"
objOLE.ListFillRange = .Name & "!A5:A6" 'Data source
End With
'Now, let's create the event procedure for this combo box
Set vbpProject = wbkReport.VBProject
Set vbcComponent = vbpProject.VBComponents(wbkReport.Worksheets(1).CodeName)
Set codModule = vbcComponent.CodeModule
lngLine = codModule.CreateEventProc("Change", "cbxMonth") 'On change event
codModule.InsertLines lngLine + 1, " VBA.Msgbox ""You choose "" & cbxMonth.Value"
'Finally, save the changes
Debug.Print codModule.countoflines
DoEvents
Application.OnTime Now(), "SaveIt"
GoTo Final
Exit Sub
Error_Handler:
VBA.MsgBox "An error has ocurred"
Final:
Set codModule = Nothing
Set vbcComponent = Nothing
Set vbpProject = Nothing
End Sub
Sub SaveIt()
wbkReport.SaveAs ThisWorkbook.Path & "\Report.xlsm", xlOpenXMLWorkbookMacroEnabled
End Sub