+ Reply to Thread
Results 1 to 5 of 5

Check and Set References with VBA

  1. #1
    Forum Contributor
    Join Date
    08-21-2008
    Location
    Hamilton, New Zealand
    MS-Off Ver
    Office 2007
    Posts
    255

    Check and Set References with VBA

    for example, is it possible to check if a Reference to Set a reference to Microsoft Internet Controls (shdocvw.dll) has been enabled in user Reference settings.
    And if not set, then set it via VBA

    thanks
    Last edited by wotadude; 03-11-2009 at 08:34 PM.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Check and Set References with VBA

    Hi

    Here's a couple of ways

    1)

    Please Login or Register  to view this content.
    This will loop through the existing references, and if it doesn't find the relelvant one, then it will add it.

    2)
    Please Login or Register  to view this content.
    This "Updates the contents of the COMAddIns collection from the list of add-ins stored in the Windows registry"
    Doesn't actually install anything, but I think it "refreshes" the list based on the registry entries.

    HTH

    rylo

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Check and Set References with VBA

    Hello wotadude,

    Here is a macro to automatically check for and load the Shdocvw.dll to your VBA project.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Forum Contributor
    Join Date
    08-21-2008
    Location
    Hamilton, New Zealand
    MS-Off Ver
    Office 2007
    Posts
    255

    Re: Check and Set References with VBA

    thank you to you both.

    both are good.

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Check and Set References with VBA

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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