+ Reply to Thread
Results 1 to 3 of 3

Add reference programmatically in VBA

  1. #1
    Registered User
    Join Date
    12-14-2013
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    4

    Add reference programmatically in VBA

    Hi,

    I want to use an external software called "Surfer" from vba. If I manually check "Surfer 10 Data Type" reference in vba, it works fine, but it requires me to check the reference library every time I open a new file. To do it programmatically I tried following commands:

    ActiveWorkbook.VBProject.References.AddFromFile "C:\Program Files\Golden Software\Surfer 10\Surfer.exe"

    ActiveWorkbook.VBProject.References.AddFromGuid "{54C3F9A2-980B-1068-83F9-0000C02A351C}", 1, 0

    Any of these commands does check the reference library in vba, but the surfer command is not recognized. Is there any other line of code that I should write to make it work?

    Thanks,
    Nasser

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Add reference programmatically in VBA

    May be
    Please Login or Register  to view this content.
    Untitled.png
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Registered User
    Join Date
    12-14-2013
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: Add reference programmatically in VBA

    Thanks Yasser for your time.

    Unfortunately it does not fix it. I doubt it is a broken reference, i guess it might be the reference file being "exe" rather than dll; and probably it needs other tweaks as well as the GUID. or Office being 365!

    I again very much appreciate your reply.

    Nasser

+ 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. Remove Reference Library Programmatically
    By mojo249 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-12-2010, 06:12 PM
  2. Setting Solver Reference-programmatically
    By davidm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-01-2006, 08:15 AM
  3. Re-execute all UDF programmatically
    By Peter in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-27-2006, 03:40 AM
  4. RE: Re-execute all UDF programmatically
    By Gary''s Student in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-26-2006, 06:50 PM
  5. XML mapping programmatically
    By Kamal in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-07-2005, 03:05 PM
  6. Selecting most of very many programmatically
    By Tony Rizzo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-27-2005, 04:05 PM
  7. How do I programmatically specify a range.
    By Hari in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-17-2005, 12:23 PM

Tags for this Thread

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