'
退出Excel
Public Function ExitExcel(oApplication As Object )
If oApplication Is Nothing Then Exit Function
oApplication.DisplayAlerts = False
oApplication.Quit
oApplication.DisplayAlerts = True
End Function
Public Function ExitExcel(oApplication As Object )
If oApplication Is Nothing Then Exit Function
oApplication.DisplayAlerts = False
oApplication.Quit
oApplication.DisplayAlerts = True
End Function
在用Excel的时候最讨厌的就是版本不同的情况下,出现一个提示,大意是问你是否重新计算公式,十分讨厌,一般都是通过DisplayAlerts来处理,但是系统里边好多地方都用了Quit,没办法,最后弄了这个函数替换一下,不然以后也麻烦。