ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Createobject returns null in Excel (https://www.excelbanter.com/excel-discussion-misc-queries/73419-createobject-returns-null-excel.html)

[email protected]

Createobject returns null in Excel
 
We have a C# library and is registered.

but when we called from Excel, the createobject returns null instead of
exception.
This happened to only one machine amonge hundred of machines and the
user can run it for the first time.

we did some tests:
1. the library can be called by VB code with Createobject method.
2. the library can be called by C# code with createinstance
3. the libary is constructor has been called and there is nothing in
the constructor.
4. Empty excel workbook with only few lines to use createobject will
return null

any idea?
thank you!


exceluserforeman

Createobject returns null in Excel
 
xlApp.excel
xlapp.visible=true

" wrote:

We have a C# library and is registered.

but when we called from Excel, the createobject returns null instead of
exception.
This happened to only one machine amonge hundred of machines and the
user can run it for the first time.

we did some tests:
1. the library can be called by VB code with Createobject method.
2. the library can be called by C# code with createinstance
3. the libary is constructor has been called and there is nothing in
the constructor.
4. Empty excel workbook with only few lines to use createobject will
return null

any idea?
thank you!




All times are GMT +1. The time now is 09:49 PM.

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