Error: Unable to get the OLEObjects property of the worksheet class
Hi there,
I keep getting the following error with the following code. How might I go around fixing it? Error: 1004, Unable to get the OLEObjects property of the Worksheet class. str = ActiveSheet.OLEObjects("cboLine").Object.Value Thanks in advance for the replies, Grant. |
Error: Unable to get the OLEObjects property of the worksheet class
Grant,
According to the Object Browser, the OLEObjects collection does not have a property called "Object'. What are you trying to achieve ? NickHK "Grant" wrote in message ... Hi there, I keep getting the following error with the following code. How might I go around fixing it? Error: 1004, Unable to get the OLEObjects property of the Worksheet class. str = ActiveSheet.OLEObjects("cboLine").Object.Value Thanks in advance for the replies, Grant. |
Error: Unable to get the OLEObjects property of the worksheet class
the collection doesn't, but he isn't using the collection. Since he has
indexed into the collection, he is using and OleObject. I got that error if the OleObject name was not cboLine. If you are using Excel 97, if you change the name of the combobox in the properties window, this doesn't change the OleObject name. You might try testing the names with code like Sub RevealName() Dim oleObj As OLEObject, cbo As MSforms.ComboBox For Each oleObj In ActiveSheet.OLEObjects If TypeOf oleObj.Object Is MSforms.ComboBox Then Set cbo = oleObj.Object MsgBox oleObj.Name & " - " & cbo.Name End If Next End Sub -- Regards, Tom Ogilvy "NickHK" wrote in message ... Grant, According to the Object Browser, the OLEObjects collection does not have a property called "Object'. What are you trying to achieve ? NickHK "Grant" wrote in message ... Hi there, I keep getting the following error with the following code. How might I go around fixing it? Error: 1004, Unable to get the OLEObjects property of the Worksheet class. str = ActiveSheet.OLEObjects("cboLine").Object.Value Thanks in advance for the replies, Grant. |
All times are GMT +1. The time now is 01:08 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com