Run-time error '91': Object variable or With block variable not set VBA
<p>I am getting the <code>Run-time error '91': Object variable or With block variable not set</code> in this part: </p>

<pre><code>  Dim cn As ADODB.Connection: Set cn = New ADODB.Connection

    schema_nm = dbsheet.cb_BU.Value

    If conn_to_SQL(cn) = False Then
        Exit Sub
    End If

    Call any_action(cn, "Load Part")
    If Not user_active = 1 Then
        Exit Sub
    End If

    Application.ScreenUpdating = False
    Application.Calculation = xlCalculationManual
    SkipSave = True


    If MDIsheet.AutoFilter.FilterMode = True Then MDIsheet.ShowAllData &lt;----HERE
</code></pre>

<p>Any suggestion?</p>