+ Reply to Thread
Results 1 to 3 of 3

Excel calling external Dll

  1. #1
    Registered User
    Join Date
    11-26-2008
    Location
    Philippines
    Posts
    26

    Excel calling external Dll

    Hi there

    Hope everybody is fine !

    I have following problem

    - I have an excel file that calls an external dll for calculation
    This file works fine on my PC

    - I have sent this file with VB code protected to another user, that has a copy of this identical dll.

    The problem is that the file loses the reference to this dll, and does not work.

    It would be needed to go into VB, references and to select the called dll, but this can't be done, since the file is protected.

    Is there a way to send this file with protection and avoiding it to lose the dll reference ?

    Many thanks

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Excel calling external Dll

    Did you not put the file into the system32 folder for both computers?

  3. #3
    Registered User
    Join Date
    10-18-2015
    Location
    Lisbon, Portugal
    MS-Off Ver
    2010
    Posts
    38

    Re: Excel calling external Dll

    Greetings,

    Advice:

    Go to your workbook where you have the reference and then go to your VBA Editor and check only the external reference (your DLL).

    then run this code:

    Please Login or Register  to view this content.
    If you get error running the code, go to: File -> Options -> Trust Center -> Trust Center Settings -> Trust Access to VBA Project

    After that you should have the GUID of the DLL you need like this:

    Please Login or Register  to view this content.
    If you need to register the DLL into the Reference Library then you can use this function in a module:

    Please Login or Register  to view this content.
    Then run this Sub in a Module:

    Please Login or Register  to view this content.
    With this in mind, in your Open Workbook Event write this code:

    Please Login or Register  to view this content.
    Between the {} put the GUID that shows in your Immediate window.

    Hope it helps,
    Daniel

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Calling External Worksheet and Setting Variable for Active Workbook
    By jhuang5132 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-15-2014, 04:32 PM
  2. Accesing external programs and calling data from other sheets.
    By MaximusPrimal in forum Excel General
    Replies: 0
    Last Post: 09-22-2009, 01:20 AM
  3. Calling named range from external workbook
    By Phraedrique in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-12-2009, 06:36 PM
  4. calling external application & returning back to activate excel workbook
    By darius.chong in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-08-2009, 10:23 PM
  5. Calling Formas and macros in an external workbook
    By TerryTee in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-12-2007, 11:40 AM
  6. [SOLVED] CALLING A RANGE OF CELLS FROM EXTERNAL SOURCE
    By ANGELICA in forum Excel General
    Replies: 2
    Last Post: 08-03-2006, 02:40 PM
  7. [SOLVED] calling excell from an external program
    By עומר in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-11-2005, 09:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1