- ·上一篇教育:excel表格中怎么弄***工作表
- ·下一篇教育:excel表格时间相加怎么计算
excel表格对象模式怎么取消
1.在vb6.0中如何关闭excel对象?
建议修改成这样:
On Error GoTo err
Dim XlsApp As Object
Dim XlsSheet As Object
Dim XlsBook As Object
Set XlsApp = CreateObject("Excel.Application")
Set XlsBook = XlsApp.Workbooks.Open(Path)
XlsApp.DisplayAlerts = False
XlsBook.Close '上面的代码出错就不执行他了
XlsApp.Quit '同上,EXCEL可能留在进程中
Set XlsBook = Nothing
Set XlsApp = Nothing
err:
If err.Number > 0 Then
If Not (XlsBook Is Nothing) Then
XlsBook.Quit
End If
If Not (XlsApp Is Nothing) Then
XlsApp.Quit
End If
End If
不能用“<>;”比较两个对象
评论内容只代表网友观点,与本站立场无关!
评论摘要(共 0 条,得分 0 分,平均 0 分)