Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Recompile com object while excel is running
I'm very new to this so please bear with me. I have created a c# class
wich is a COM object. I call methods of that object from VBA in excel. It all works well. great. However, sometimes I want to make changes to the class in C#. I find that I can't recompile the class in the visual studio .net compiler becuase it says that the files are in use. In order to compile I need to totaly shut down excel. Is there anyway I can compile without shutting down excel? The macro is finished, why does it still hold on to the dll? On a possibly related note. The c# class makes a soap call to another server (which is single threaded). The C# object is holding the connection to the soap server and is blocking other requests. The connection is not closed until Excel quits. Please Help! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Recompile com object while excel is running
On the first one:
As long as Excel holds a reference to the dll you can't compile. No idea about the second question. RBS wrote in message oups.com... I'm very new to this so please bear with me. I have created a c# class wich is a COM object. I call methods of that object from VBA in excel. It all works well. great. However, sometimes I want to make changes to the class in C#. I find that I can't recompile the class in the visual studio .net compiler becuase it says that the files are in use. In order to compile I need to totaly shut down excel. Is there anyway I can compile without shutting down excel? The macro is finished, why does it still hold on to the dll? On a possibly related note. The c# class makes a soap call to another server (which is single threaded). The C# object is holding the connection to the soap server and is blocking other requests. The connection is not closed until Excel quits. Please Help! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Recompile com object while excel is running
So is there a way to tell excel to drop the reference?
|
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Recompile com object while excel is running
This is code that is run from within VBA in an .xla add-in:
Sub RemoveReference(strReference As String) Dim r As Reference For Each r In ThisWorkbook.VBProject.References If r.Name = strReference Then ThisWorkbook.VBProject.References.Remove r Exit Sub End If Next End Sub It will need some alterations if you want to run this from your C# IDE, but this is the principle of it. RBS wrote in message oups.com... So is there a way to tell excel to drop the reference? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Recompile com object while excel is running
thx. Will give it a try.
-ECW |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
More then 1 Excel object running at same time , how can I refer to right one in code? | Excel Programming | |||
Running Macro from objApp Application object | Excel Programming | |||
Reference to DLL corrupts on recompile of dll | Excel Programming | |||
Excel Object in VB when running under scheduler control | Excel Programming |