quote:以下是引用youhm在2009-09-24 18:42:45的发言:
GetObject(,"Excel.Application")获取当前打开的Excel对象,如果获取不到再用CreateObject创建Excel对象
dim allbest
on error resume next
set allbest=getobject("Excel.Application")
if err.number<>0 then
set allbest=CreateObject("Excel.Application")
endif
err.clear
no error goto 0
set mybest=allbest.workboks.open"E:\***.xls"