![]() |
【转帖】[vba]cad vba访问excel出错!
[vba]cad vba访问excel出错!
www.dimcax.com [vba]cad vba访问excel出错! 如下程序: sub outex() dim ex as excel.application dim exworkbook as workbook dim exsheet as worksheet on error resume next set ex = getobject(, "excel.application") if err <> 0 then err.clear set ex = createobject("excel.application") if err <> 0 then err.clear msgbox "建立excel应用出错!" exit sub end if end if set exworkbook = ex.workbooks.add set exsheet = exworkbook.activesheet ex.visible = true end sub 执行到红色部分,出现以下错误: 运行时错误“91”: 对象变量或with块变量未设置 程序已经引用了microsoft excel 11.0 object library 大家帮忙解决以下呀!分析下什么问题? autocad |
所有的时间均为北京时间。 现在的时间是 01:46 AM. |