Hi,
I hope that someone knows the solution to this one.
I have written a macro in excel 2007 which runs a database query with some user selected criteria and consequently fills some graphs and tables on a sheet.
As part of the project it also updates and adds items in a couple of OLEObjects (comboboxes).
I hope that someone knows the solution to this one.
I have written a macro in excel 2007 which runs a database query with some user selected criteria and consequently fills some graphs and tables on a sheet.
As part of the project it also updates and adds items in a couple of OLEObjects (comboboxes).
This is working fine and I tested on different other pc’s. On one pc however it does not work and crashes on the code referring to the OLEObjects with the error:
Run-time error 1004, Unable to get Object Property of OLEObject class
It crashes on the first line of the following code:
Set cboTemp = ws.OLEObjects("ComboSalesman")
With cboTemp
.ListFillRange = "Salesman"
.Object.ListIndex = 0
End With
.ListFillRange = "Salesman"
.Object.ListIndex = 0
End With
After this more code follows referring to other objects and if I test those the same error appears on that one pc only. Of course this is the pc of the designated user of the report L.
On all pc’s I am using Excel 2007. I have checked to see if maybe some libraries (references) where not set on the pc where the code is not working but that seems fine (as it should be).
On all pc’s I am using Excel 2007. I have checked to see if maybe some libraries (references) where not set on the pc where the code is not working but that seems fine (as it should be).
What can cause this code to crash on one pc only?
Help is much appreciated!
Marc<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
Help is much appreciated!
Marc<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>