CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2009
    Posts
    1

    Referencing a DLL from Excel VBA code

    I'm trying to use an excel add-in that comes with a custom developed DLL for calculations which is usually stored in my windows/system32 directory.

    Can I still reference the file from my excel vba without storing in windows/system 32?

    For example, I tried to register it manually based on storing it in another location using the regsvr32 command but I was unsuccessful with the message “the file was loaded but the DLL register server entry point was not found”

    Could I use code to open/reference/activate the file by placing it in another location (e.g. the folder where the addin is stored)?


    I am not a progammer, just know some basic VBA for excel so really hope someone can help.

    Thanks,

    Nick

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Referencing a DLL from Excel VBA code

    Put it in the app.path folder, and the .exe should look there. It would still have to be registered, though.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured