Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default dll reference

I reference dlls for excel macros and occasionally, I get a MISSING
error. It usually happens when the dll is in a different path than
originally programmed. For example: c:\windows\system and
c:\winnt\system.

Does excel store the original path? I assume it should be getting it
from the registry.

Thanks
Dwight

  #2   Report Post  
Posted to microsoft.public.excel.programming
moi moi is offline
external usenet poster
 
Posts: 27
Default dll reference

Windows applications start searching for dll's in the own application path
and if it's not there, they look in $windir\SYSTEM32.


"Dwight" schreef in bericht
oups.com...
I reference dlls for excel macros and occasionally, I get a MISSING
error. It usually happens when the dll is in a different path than
originally programmed. For example: c:\windows\system and
c:\winnt\system.

Does excel store the original path? I assume it should be getting it
from the registry.

Thanks
Dwight



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default dll reference

Hi Dwight,

MISSING references are usually caused by versioning problems (the
version of the DLL on the machine is not the same as the version of the DLL
referenced by Excel) or incorrect registration of the DLL on the machine.

First try closing excel and re-registering the DLL by opening a command
window and running:

C:regsvr32 "C:\<your path\<your dll name.dll"

where "C:\<your path\<your dll name.dll" is the exact path and filename of
the dll on that computer. If that doesn't solve the problem you have a
versioning issue.

The only way to solve this is to open the affected workbook, choose
Tools/References from the VBE menu, uncheck the MISSING reference and click
OK, choose Tools/References again and reselect the reference.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm

"Dwight" wrote in message
oups.com...
I reference dlls for excel macros and occasionally, I get a MISSING
error. It usually happens when the dll is in a different path than
originally programmed. For example: c:\windows\system and
c:\winnt\system.

Does excel store the original path? I assume it should be getting it
from the registry.

Thanks
Dwight



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default dll reference

Thanks for the quick response Rob. So it sounds like it could be more
of a versioning problem.

If I update a dll, does one have to relink the macro to dll?


I have 4 dlls that are used within 100 macros. When changes are made to
the dlls, versioning isn't changed, or at least I don't think it is.

Thanks
Dwight


Rob Bovey wrote:
Hi Dwight,

MISSING references are usually caused by versioning problems (the
version of the DLL on the machine is not the same as the version of the DLL
referenced by Excel) or incorrect registration of the DLL on the machine.

First try closing excel and re-registering the DLL by opening a command
window and running:

C:regsvr32 "C:\<your path\<your dll name.dll"

where "C:\<your path\<your dll name.dll" is the exact path and filename of
the dll on that computer. If that doesn't solve the problem you have a
versioning issue.

The only way to solve this is to open the affected workbook, choose
Tools/References from the VBE menu, uncheck the MISSING reference and click
OK, choose Tools/References again and reselect the reference.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm

"Dwight" wrote in message
oups.com...
I reference dlls for excel macros and occasionally, I get a MISSING
error. It usually happens when the dll is in a different path than
originally programmed. For example: c:\windows\system and
c:\winnt\system.

Does excel store the original path? I assume it should be getting it
from the registry.

Thanks
Dwight


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default dll reference

Hi Dwight,

If I update a dll, does one have to relink the macro to dll?


If you change anything that affects the public interface of the DLL then
you'll have to re-establish all of the references to it.

I have 4 dlls that are used within 100 macros. When changes are made to
the dlls, versioning isn't changed, or at least I don't think it is.


That depends on your project property settings. In VB6 under the
Project/<DLL name Properties menu look at the Component tab and see what
you have selected under Version Compatibility.

If it's No Compatibility then you will create MISSING references every
time you recompile. If it's Project Compatibility, VB will try to make the
new version compatible with the old version, but if the code modifications
you've made change the public interface then it won't work and you'll get
MISSING references.

Once you've deployed your DLL you should always develop using the Binary
Compatibility setting. Store a copy of the deployed DLL version in a
separate folder and point the file name box at that copy. If you then change
the DLL in such a way that it breaks the public interface, VB will warn you
and not allow you to compile the project. You can then decide whether it's
worth resetting all your references.

If so, unregister and delete any previous versions of your DLL, change
the compatibility setting to No Compatibility, compile a new version of your
DLL, copy that new version to the storage directory, change the
compatibility setting back to binary and make sure the file name box on the
Component tab is pointing at the new version of the DLL, then reset all your
MISSING references. This is one of the true joys of COM programming. :-)

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm

"Dwight" wrote in message
oups.com...
Thanks for the quick response Rob. So it sounds like it could be more
of a versioning problem.

If I update a dll, does one have to relink the macro to dll?


I have 4 dlls that are used within 100 macros. When changes are made to
the dlls, versioning isn't changed, or at least I don't think it is.

Thanks
Dwight


Rob Bovey wrote:
Hi Dwight,

MISSING references are usually caused by versioning problems (the
version of the DLL on the machine is not the same as the version of the
DLL
referenced by Excel) or incorrect registration of the DLL on the machine.

First try closing excel and re-registering the DLL by opening a
command
window and running:

C:regsvr32 "C:\<your path\<your dll name.dll"

where "C:\<your path\<your dll name.dll" is the exact path and filename
of
the dll on that computer. If that doesn't solve the problem you have a
versioning issue.

The only way to solve this is to open the affected workbook, choose
Tools/References from the VBE menu, uncheck the MISSING reference and
click
OK, choose Tools/References again and reselect the reference.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm

"Dwight" wrote in message
oups.com...
I reference dlls for excel macros and occasionally, I get a MISSING
error. It usually happens when the dll is in a different path than
originally programmed. For example: c:\windows\system and
c:\winnt\system.

Does excel store the original path? I assume it should be getting it
from the registry.

Thanks
Dwight




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
Changing sheet reference to cell reference TeeJay Excel Worksheet Functions 3 October 19th 07 11:50 AM
Using an offset formula for the reference in a relative reference Cuda Excel Worksheet Functions 6 November 15th 06 05:12 PM
Formulas that reference cells that reference another cell Andrea Excel Discussion (Misc queries) 7 October 19th 06 08:14 AM
Row reference increment but preserve column reference Pwanda Excel Worksheet Functions 1 April 28th 05 01:12 PM
Macro to Reference Column Next to Current Reference dolphinv4 Excel Discussion (Misc queries) 2 April 11th 05 08:36 AM


All times are GMT +1. The time now is 10:01 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"