| 在Access中调用Excel无法彻底关闭 |
|
| 作者:未知 文章来源:Access911 点击数: 本日:{$DayHits} 更新时间:2005-2-4 22:22:18 |
|
Office 组件都有一个 Quit 方法,直接调用 Quit 方法可以彻底退出该程序 以下以Excel为例子: Function Automation_To_Excel() Dim objExcel As Object ' Create a new instance of Excel. Set objExcel = CreateObject("Excel.Application") ' Show the instance of Excel on the screen. objExcel.Visible = True ' Open a file named SampleFile.xls objExcel.Workbooks.Open ("C:\My Documents\SampleFile.xls") ' Explicitly close the instance of Excel to free up memory ' and set the variable to Nothing to free up the name ' space in access. objExcel.Quit Set objExcel = Nothing End Function |
| 文章录入:tm 责任编辑:tmtony |
|
上一篇文章: Access导出到Excel提速之法
下一篇文章: XLS与MDB文件格式互换全攻略 |
| 【字体:小 大】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |