Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default VB6 DLL addin trouble

I have several DLLs that i make in VB6, and whenever I update them by
adding new functions, all the references that my workbooks made to these
DLLs are now broken and i have to reset them. Why does this happen? Is
it because the workbooks are bound to the GUID of the DLL, which perhaps
changes on every compilation? If so, is there anyway in VB6 to compile
DLLs with the same GUID? Or is there any programmatic way to update the
references to my workbooks so that i won't have to keep resetting them
manually?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default VB6 DLL addin trouble

1. Under project properties in VB, set Binary Compatability on the Component
tab.
1b. This won't always work because you might change some things in the
project such that compatability cannot be maintained.
2. In VBA, create the reference to the dll dynamically rather than through
the references. This means that if the system ref to the dll changes, you
will still get the correct file rather than having to unload the reference,
then reload it on the new id.

e.g.
Public DB as Object

Sub CreateRef()
If DB Is Nothing Then Set DB = CreateObject("myDll.clsName")
Exit Sub

HTH,

Robin Hammond
www.enhanceddatasystems.com

"R Avery" wrote in message
...
I have several DLLs that i make in VB6, and whenever I update them by
adding new functions, all the references that my workbooks made to these
DLLs are now broken and i have to reset them. Why does this happen? Is it
because the workbooks are bound to the GUID of the DLL, which perhaps
changes on every compilation? If so, is there anyway in VB6 to compile
DLLs with the same GUID? Or is there any programmatic way to update the
references to my workbooks so that i won't have to keep resetting them
manually?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default VB6 DLL addin trouble

Thanks a lot! This has really helped. Most of the time, I am only
changing the code inside procedures, not anything that would break
interfaces. Now i don't have to waste time always reseting references.

Thanks Robin.


Robin Hammond wrote:
1. Under project properties in VB, set Binary Compatability on the Component
tab.
1b. This won't always work because you might change some things in the
project such that compatability cannot be maintained.
2. In VBA, create the reference to the dll dynamically rather than through
the references. This means that if the system ref to the dll changes, you
will still get the correct file rather than having to unload the reference,
then reload it on the new id.

e.g.
Public DB as Object

Sub CreateRef()
If DB Is Nothing Then Set DB = CreateObject("myDll.clsName")
Exit Sub

HTH,

Robin Hammond
www.enhanceddatasystems.com

"R Avery" wrote in message
...

I have several DLLs that i make in VB6, and whenever I update them by
adding new functions, all the references that my workbooks made to these
DLLs are now broken and i have to reset them. Why does this happen? Is it
because the workbooks are bound to the GUID of the DLL, which perhaps
changes on every compilation? If so, is there anyway in VB6 to compile
DLLs with the same GUID? Or is there any programmatic way to update the
references to my workbooks so that i won't have to keep resetting them
manually?




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
Remove Excel AddIn from AddIn List !! Help carl Excel Programming 2 December 8th 03 03:36 PM
Addin Peter Pantus Excel Programming 4 October 11th 03 07:40 PM
AddIn Robin Clay[_2_] Excel Programming 2 September 15th 03 07:08 PM
AddIn Robin Clay[_2_] Excel Programming 0 September 10th 03 11:36 AM
AddIn Robin Clay[_2_] Excel Programming 6 September 8th 03 11:08 AM


All times are GMT +1. The time now is 05:27 AM.

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"