Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default instance of class from dll, is it possible??

I have think of a method.
Make the dll which can be accessible in excel. Com-operate.

And then in excel , import it and make use of it by
dim obj as new dllname.dllclass

"rchiuhk" wrote in message
...
Dear all,

I have written a dll with a class with startex() and closeex() procedure.
In excel programming VBA, I have declare the sub of startex and closeex.
They will refer to the dll.
But would startex and closeex share the same object e.g. xlApp and
would closeex close the object (xlApp) which set by startex????

On the other hand, is it possible to declare the class in excel
programming VBA? If yes, then I am sure that they are accessing to the
same instance of the class.
public class class1
{
Excel.Application xlApp;
...
private void startex()
{
xlApp=new Excel.Applicationclass();
..........
}

private void closeex()
{
xlApp.Quit();
releaseobject(xlApp);
...............
}
}





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Name of Class instance Balmain Bushwalker[_2_] Excel Programming 2 October 25th 07 11:22 AM
Scripting Dictionary in a class instance Art Excel Programming 3 March 28th 07 01:20 PM
Ensure single class instance but with multiple references to it [email protected] Excel Programming 4 January 6th 06 02:31 AM
Userform level class instance doesn't recognize methods =Ray= Excel Programming 2 December 16th 05 05:58 PM
Class Instance Identifier Chip Pearson Excel Programming 6 June 29th 04 09:34 AM


All times are GMT +1. The time now is 05:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"