ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   OLEObject on worksheet. Trying to get value from it. (https://www.excelbanter.com/excel-programming/306381-oleobject-worksheet-trying-get-value.html)

grant

OLEObject on worksheet. Trying to get value from it.
 
Hi there.

I have a drop down list on a normal excel worksheet (not
a user form), which I am trying to grab its value from. I
am using the following:

ActiveSheet.OLEObjects("cboLine").Object.Value

but it keeps saying "Unable to get OLEObjects property
from the worksheet class".

How might I go about fixing this?

Thanks in advance for the replies,
Grant.

William[_2_]

OLEObject on worksheet. Trying to get value from it.
 
Hi Grant

This worked for me

MsgBox ActiveSheet.ComboBox1.Value

--
XL2002
Regards

William



"Grant" wrote in message
...
| Hi there.
|
| I have a drop down list on a normal excel worksheet (not
| a user form), which I am trying to grab its value from. I
| am using the following:
|
| ActiveSheet.OLEObjects("cboLine").Object.Value
|
| but it keeps saying "Unable to get OLEObjects property
| from the worksheet class".
|
| How might I go about fixing this?
|
| Thanks in advance for the replies,
| Grant.



William[_2_]

OLEObject on worksheet. Trying to get value from it.
 
Hi Grant

This worked for me

MsgBox ActiveSheet.ComboBox1.Value


--
XL2002
Regards

William



"Grant" wrote in message
...
| Hi there.
|
| I have a drop down list on a normal excel worksheet (not
| a user form), which I am trying to grab its value from. I
| am using the following:
|
| ActiveSheet.OLEObjects("cboLine").Object.Value
|
| but it keeps saying "Unable to get OLEObjects property
| from the worksheet class".
|
| How might I go about fixing this?
|
| Thanks in advance for the replies,
| Grant.



William[_2_]

OLEObject on worksheet. Trying to get value from it.
 
Grant

If your dropdown list is created from the "Forms" toolbar, then..

MsgBox ActiveSheet.DrawingObjects("Drop Down 2").Value

--
XL2002
Regards

William



"William" wrote in message
...
| Hi Grant
|
| This worked for me
|
| MsgBox ActiveSheet.ComboBox1.Value
|
|
| --
| XL2002
| Regards
|
| William
|
|

|
| "Grant" wrote in message
| ...
| | Hi there.
| |
| | I have a drop down list on a normal excel worksheet (not
| | a user form), which I am trying to grab its value from. I
| | am using the following:
| |
| | ActiveSheet.OLEObjects("cboLine").Object.Value
| |
| | but it keeps saying "Unable to get OLEObjects property
| | from the worksheet class".
| |
| | How might I go about fixing this?
| |
| | Thanks in advance for the replies,
| | Grant.
|
|



William[_2_]

OLEObject on worksheet. Trying to get value from it.
 
Grant

If your dropdown list is created from the "Forms" toolbar, then..

MsgBox ActiveSheet.DrawingObjects("Drop Down 2").Value


--
XL2002
Regards

William



"William" wrote in message
...
| Hi Grant
|
| This worked for me
|
| MsgBox ActiveSheet.ComboBox1.Value
|
|
| --
| XL2002
| Regards
|
| William
|
|

|
| "Grant" wrote in message
| ...
| | Hi there.
| |
| | I have a drop down list on a normal excel worksheet (not
| | a user form), which I am trying to grab its value from. I
| | am using the following:
| |
| | ActiveSheet.OLEObjects("cboLine").Object.Value
| |
| | but it keeps saying "Unable to get OLEObjects property
| | from the worksheet class".
| |
| | How might I go about fixing this?
| |
| | Thanks in advance for the replies,
| | Grant.
|
|




All times are GMT +1. The time now is 10:05 AM.

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