+ Reply to Thread
Results 1 to 4 of 4

VBA code to check for missing reference.

  1. #1
    Registered User
    Join Date
    07-06-2007
    Posts
    2

    VBA code to check for missing reference.

    Does anyone have any code to check for a specific reference, whether it is missing? (SFDCExcelAddin)

    The only examples I have found after extensive searching are for VB not VBA

    I have code which creates menu items dependent on whether or not certain references are present.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Why not use late Binding then you won't need to set any references?
    Hope that helps.

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

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    01-21-2005
    Location
    Colorado
    MS-Off Ver
    2000,2003,2007
    Posts
    481
    You can use the VBProjects.References property of the workbook and test each item to see if it matches your criteria (SFDCExcelAddin).

    Use a For Each loop

    Please Login or Register  to view this content.
    HTH

  4. #4
    Registered User
    Join Date
    07-06-2007
    Posts
    2
    Thanks for the code. Unfortunately I am getting the following error:

    Run-time error
    programmatic access to visual basic project is not trusted
    Searching on Google it seems that I would have to change the security on each pc by going to macro security, trusted publishers and enable "Trust access to visual basic project"

    Sometimes Microsoft make you want to scream!

+ 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