Private Sub Command1_Click()
    Dim appexcel As Excel.Application
    
    Set appexcel = CreateObject("Excel.Application")
    appexcel.Workbooks.Add
    appexcel.Visible = True
    appexcel.Quit
    Set appexcel = Nothing
End Sub
正常通过

解决方案 »

  1.   

    Private Sub Command1_Click()
        Dim appexcel As Excel.Application
        
        Set appexcel = CreateObject("Excel.Application")
        appexcel.Workbooks.Add
        appexcel.Visible = True
        appexcel.Quit
        Set appexcel = Nothing
    End Sub
    正常通过
      

  2.   

    Private Sub Command1_Click()
        Dim appexcel As Excel.Application
        
        Set appexcel = CreateObject("Excel.Application")
        appexcel.Workbooks.Open "g:\test.xls"
        appexcel.Visible = True
        appexcel.Quit
        Set appexcel = Nothing
    End Sub
    也正常通过无发现EXCEL驻留内存
      

  3.   

    appExcel.quit
    Set appExcel = Nothing对,没错