更改窗体状态excel就关闭,不动就就杀不掉,为何,菜鸟跪求[vb.net]
代码如下:
Imports System
Imports System.Reflection ' For Missing.Value and BindingFlags
Imports System.Runtime.InteropServices ' For COMException
Imports Excel
…………
Dim VBExcel As Application
VBExcel = New Application()
VBExcel.UserControl = False
VBExcel.Visible = False
With VBExcel
With VBExcel.Workbooks.Open(Me.TextBox4.Text)
With VBExcel.ActiveWorkbook
VBExcel.ActiveWorkbook.Close(True)
End With
End With
.Quit()
End With
VBExcel = Nothing
程序运行了,excel进程不退,但最小化后又回来,进程就没有了,其他地方我都没有动,比较郁闷找不到原因