ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Why can't create Excel.Application using CreateObject? (https://www.excelbanter.com/excel-programming/297403-why-cant-create-excel-application-using-createobject.html)

[email protected]

Why can't create Excel.Application using CreateObject?
 
Hi, there
I try to create an "Excel.Application" object using CreateObject function, I got "nothing" from the return variable without any error messages, but It works well on another computer, we have the same environment settings(include same references setting) on those 2 computers: Win2k/Sp4, VB6/Sp5, Mdac_type2.7, the following is source code snippet

Public appWorld As Excel.Applicatio
Public wbWorld As Excel.Workboo
Sub Setup()
On Error Resume Next 'ignore error
Set appWorld = GetObject(, "Excel.Application"
If Err.Number < 0 The
Set appWorld = CreateObject("Excel.Application") 'run i
End I
Err.Clea
End Su

I got "nothing" from "appWorld", even I remark all of error handle lines, the same result I got, pls help me,thanks



All times are GMT +1. The time now is 01:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com