Thread: References
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
keri keri is offline
external usenet poster
 
Posts: 34
Default References

Hi,

I have distributed a spreadsheet which has a reference set to the
Microsoft ActiveX Data Objects 2.8 library. Unfortunately we have now
discovered that "some" users have this reference MISSING.

I wanted to send out a program to open the VB module of the workbook
with the missing reference, remove the MISSING reference and add a new
reference to the ActiveX Data Objects library that they do have
(2.5).

Problem 1.

I have been trying to test some code in my own copy of the sheet to
add references as per below;

Dim varaddreference
varaddreference =
ActiveWorkbook.VBProject.References.AddFromGuid("{ EAB22AC0-30C1-11CF-
A7EB-0000C05BAE0B}", 1, 1)

However I get an error;

Run time error 438
Object doesn't support this property or method

Problem 2.

I do not know how to remove references that are marked as missing

Problem 3.
If I can get this code working how can i get the GUID for a reference
I do not have on my PC (for the ActiveX Data Objects 2.5 library)?