Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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.





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA error: Unable to set the Values property of the Series class Marco Shaw Charts and Charting in Excel 1 July 12th 05 02:34 PM
Run time error 1004 - Unable to get add property of the buttons class Mark[_37_] Excel Programming 0 March 1st 04 10:48 AM
Unable to set Bold property of the Font Class Mike Lee Excel Programming 2 January 19th 04 07:23 PM
Run-time error '1004' - Unable to set the Visible property of the Worksheet class Shalin Chopra Excel Programming 3 November 25th 03 09:38 PM
Unable to set the colorIndex Property of the Interior Class Error GriffyGriff Excel Programming 3 October 3rd 03 04:37 PM


All times are GMT +1. The time now is 01:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"