Error loading Userform (run time error 249 - crash Excel)

0

The detail is, I have a file that loads a form when it is opened, but if I close the form and then try to execute it again, it sends me the following error.

"run time error 429 activex component can not create object"

I already checked the part of the references, and this is what I already have active.

In addition to also add the end part add what follows.

Private Sub UserForm_Terminate()
    Unload UserForm3
    Workbooks("MXOne.xlsm").Save
    ActiveWorkbook.Close
End Sub

and the following is my function to close the workbook.

Private Sub UserForm_QueryClose _
  (Cancel As Integer, CloseMode As Integer)
  Windows("Libro1.xlsm").Activate
'   Prevents use of the Close button
    If CloseMode = vbFormControlMenu Then
        Answerb = MsgBox("Want to exit and save?", vbQuestion + vbYesNo)

        If Answerb = vbYes Then

            Sheets("Sheet1").Select
            Columns("A:FD").Clear
            Range("A1").select

            Sheets("Sheet9").Select
            Columns("A:I").Clear
            Columns("K:AZ").Clear

            CloseMode = 1
            Cancel = 1
            Unload UserForm1
            ThisWorkbook.Close True
        Else
            Cancel = True
        End If
    End If
End Sub

But in spite of reviewing and everything, at the moment of opening it, closing it and reopening it, it sends me the error 429.

Can you help me please?

Greetings.

    
asked by larc 31.10.2018 в 00:12
source

0 answers