ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   object library or invalid reference (https://www.excelbanter.com/excel-programming/411078-object-library-invalid-reference.html)

Bob Flanagan[_2_]

object library or invalid reference
 
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



Charles Williams

object library or invalid reference
 
What references are you using?

"Bob Flanagan" wrote in message
. ..
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




Bob Flanagan[_2_]

object library or invalid reference
 
VB for applications
Excel object library
OLE automation
Office forms library

Bob

"Charles Williams" wrote in message
...
What references are you using?

"Bob Flanagan" wrote in message
. ..
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






Peter T

object library or invalid reference
 
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




"Bob Flanagan" wrote in message
. ..
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






All times are GMT +1. The time now is 08:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com