object library or invalid reference

B

Bob Flanagan

I have an add-in that on one user's PC is saying office library invalid or
contains invalid references when it is executed. However, in Tools,
References, all is fine. None are missing. All references are the same as
another add-in which works fine. I've rebuild the add-in with the code
cleaner and the max number of lines is 509, and the add-in is quite small.

The user is using Excel 2007, but it works on other 2007 machines.

Any thoughts?

Bob
 
B

Bob Flanagan

VB for applications
Excel object library
OLE automation
Office forms library

Bob
 
P

Peter T

Perhaps somehow a wrong version reference has been picked up, can't think
how though. Maybe compare a list of reference details returned on Excel 2007
machines that do/don't work. Might have to run the following in a different
wb. User might need to allow the trust access to vb project setting.

Sub RefDetails()
Dim p As Long
Dim wb As Workbook
Dim rf As Object

Set wb = ThisWorkbook
'Set wb = Workbooks("myFile.xla/s")
For Each rf In wb.VBProject.References
With rf
p = InStrRev(.fullpath, "\")
Debug.Print .Name, _
Mid$(.fullpath, p + 1, 12), _
.major & "." & .minor, _
.GUID
End With
Next

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top