Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default After each new dll compilation I have to set the reference to the dll in Excel again.

I've programmed a Visual Basic dll which is referred to within the Excel VB
after that I've set a reference to this dll within the Excel VBA add
reference dialog. Anything works good until the moment when I compile a new
version of the dll and replace the old one (just by copying). Each time I do
that, Excel reports

error 430 , class doesn't support automation or expected interface.

The only way to have the new dll running, is by removing the existing
reference to the dll first, close the add reference dialog, open the add
reference dialog again and setting the reference to the dll again. Is there
a way to overcome this, or automate these last mentioned activities by
coding ?

regards,
Oscar


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default After each new dll compilation I have to set the reference to the dll in Excel again.

Oscar,

I think you need to set the Binary Compatability option in VB under the
compile or make tabs of project properties.

Robin Hammond
www.enhanceddatasystems.com

"Oscar" wrote in message
...
I've programmed a Visual Basic dll which is referred to within the Excel
VB after that I've set a reference to this dll within the Excel VBA add
reference dialog. Anything works good until the moment when I compile a
new version of the dll and replace the old one (just by copying). Each
time I do that, Excel reports

error 430 , class doesn't support automation or expected interface.

The only way to have the new dll running, is by removing the existing
reference to the dll first, close the add reference dialog, open the add
reference dialog again and setting the reference to the dll again. Is
there a way to overcome this, or automate these last mentioned activities
by coding ?

regards,
Oscar



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default After each new dll compilation I have to set the reference to the dll in Excel again.

Hi Robin,

thanks for your quick reply. Your suggestion seems to be the solution to the
problem as I concluded after running some tests after that I changed to
Binary Compatibility. There is however one little problem during
compilation. Since I had changed the project name a long time ago and also
changed the arguments of some public class procedures, I receive several
warnings during compilation stating these differences. They advice me to
return to the 'old' projectname and arguments in order to prevent this
message to appear. I was wondering how I can set the Binary Compatibility
check with the new project as reference instead of the old one.

regards,
Oscar

"Robin Hammond" schreef in bericht
...
Oscar,

I think you need to set the Binary Compatability option in VB under the
compile or make tabs of project properties.

Robin Hammond
www.enhanceddatasystems.com

"Oscar" wrote in message
...
I've programmed a Visual Basic dll which is referred to within the Excel
VB after that I've set a reference to this dll within the Excel VBA add
reference dialog. Anything works good until the moment when I compile a
new version of the dll and replace the old one (just by copying). Each
time I do that, Excel reports

error 430 , class doesn't support automation or expected interface.

The only way to have the new dll running, is by removing the existing
reference to the dll first, close the add reference dialog, open the add
reference dialog again and setting the reference to the dll again. Is
there a way to overcome this, or automate these last mentioned activities
by coding ?

regards,
Oscar





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default After each new dll compilation I have to set the reference to the dll in Excel again.

Roedd <<Oscar wedi ysgrifennu:

I
receive several warnings during compilation stating these
differences. They advice me to return to the 'old' projectname and
arguments in order to prevent this message to appear. I was wondering
how I can set the Binary Compatibility check with the new project as
reference instead of the old one.


Welcome to com dll hell.

Ignore the warnings and compile the dll. This will become the base dll for
all of your future developments. All past distribution of your project must
be recalled or abandoned. I hope that this will not cause you too much
trouble, but it must be done.

Create a copy of the dll and rename it to [yourdllname].cpt

Now set the binary compatibility of the VB project to this (*.cpt) file.

Remember that from now on you have a contract with your project: You WILL
NOT change names of properties or methods and you WILL NOT change their
arguments. By all means add new properties and/or methods, and hide obsolete
ones, but stick to the contract or you will be back in com dll hell. I've
been there. It's not a nice place.

--
Rob

http://www.asta51.dsl.pipex.com/webcam/

This message is copyright Robert Bruce and intended
for distribution only via NNTP.
Dissemination via third party Web forums with the
exception of Google Groups and Microsoft Communities
is strictly prohibited and may result in legal action.


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
Excel: Compilation error in Module 1. How can I find it? Tom Torda Excel Discussion (Misc queries) 1 January 13th 07 11:51 PM
VBA Excel compilation error + Z + Excel Programming 1 January 15th 05 05:54 PM
"Compilation" d'une feuille Excel / Compiling an excel sheet mk Excel Programming 1 June 15th 04 12:43 PM
EXCEL VBA - Data compilation coming in from an external feed marcus[_2_] Excel Programming 0 January 29th 04 04:14 AM
Conditional compilation WK Excel Programming 1 August 18th 03 01:05 AM


All times are GMT +1. The time now is 07:02 PM.

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

About Us

"It's about Microsoft Excel"