#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 146
Default OLEObjects

Hello I have a larger version of this

Set controls = Sheet1.OLEObjects
for each control in controls
control.value = "Test"
next control


Having a problem where I can't find the property/method to change the value
of the control object, as it appears a OLEObject does not contain a
method/prop called Value.

Just wondering how I can assign a value to a control like this?

All the controls on my sheet 1 are Control Textboxes, and I'm using Excel
2003.

Thanks for any help you can offer.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default OLEObjects

Try

Set controls = Sheet1.OLEObjects
for each control in controls.Object
control.value = "Test"
next control


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"NateBuckley" wrote in message
...
Hello I have a larger version of this

Set controls = Sheet1.OLEObjects
for each control in controls
control.value = "Test"
next control


Having a problem where I can't find the property/method to change the
value
of the control object, as it appears a OLEObject does not contain a
method/prop called Value.

Just wondering how I can assign a value to a control like this?

All the controls on my sheet 1 are Control Textboxes, and I'm using Excel
2003.

Thanks for any help you can offer.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 146
Default OLEObjects

Unfortunetly I get a "Object does not support this property or method" error.

Thanks for the suggestion though.

"Bob Phillips" wrote:

Try

Set controls = Sheet1.OLEObjects
for each control in controls.Object
control.value = "Test"
next control


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"NateBuckley" wrote in message
...
Hello I have a larger version of this

Set controls = Sheet1.OLEObjects
for each control in controls
control.value = "Test"
next control


Having a problem where I can't find the property/method to change the
value
of the control object, as it appears a OLEObject does not contain a
method/prop called Value.

Just wondering how I can assign a value to a control like this?

All the controls on my sheet 1 are Control Textboxes, and I'm using Excel
2003.

Thanks for any help you can offer.





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 146
Default OLEObjects

Actually ignore my last thread,

although it didn't work that way, it did work this way

For each control in controls
control.Object.value = "Test"
next control

Thank you very much! :) Little confused why I have to refer to object within
control instead of just .value so if you can explain that'd be grand, but
thanks anyways.

"Bob Phillips" wrote:

Try

Set controls = Sheet1.OLEObjects
for each control in controls.Object
control.value = "Test"
next control


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"NateBuckley" wrote in message
...
Hello I have a larger version of this

Set controls = Sheet1.OLEObjects
for each control in controls
control.value = "Test"
next control


Having a problem where I can't find the property/method to change the
value
of the control object, as it appears a OLEObject does not contain a
method/prop called Value.

Just wondering how I can assign a value to a control like this?

All the controls on my sheet 1 are Control Textboxes, and I'm using Excel
2003.

Thanks for any help you can offer.





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default OLEObjects

The OLEObject can be considered a container for the actual control.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"NateBuckley" wrote in message
...
Actually ignore my last thread,

although it didn't work that way, it did work this way

For each control in controls
control.Object.value = "Test"
next control

Thank you very much! :) Little confused why I have to refer to object
within
control instead of just .value so if you can explain that'd be grand, but
thanks anyways.

"Bob Phillips" wrote:

Try

Set controls = Sheet1.OLEObjects
for each control in controls.Object
control.value = "Test"
next control


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"NateBuckley" wrote in message
...
Hello I have a larger version of this

Set controls = Sheet1.OLEObjects
for each control in controls
control.value = "Test"
next control


Having a problem where I can't find the property/method to change the
value
of the control object, as it appears a OLEObject does not contain a
method/prop called Value.

Just wondering how I can assign a value to a control like this?

All the controls on my sheet 1 are Control Textboxes, and I'm using
Excel
2003.

Thanks for any help you can offer.









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 146
Default OLEObjects

Thanks mate, It makes more sense now.

Cheers!

"Jon Peltier" wrote:

The OLEObject can be considered a container for the actual control.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"NateBuckley" wrote in message
...
Actually ignore my last thread,

although it didn't work that way, it did work this way

For each control in controls
control.Object.value = "Test"
next control

Thank you very much! :) Little confused why I have to refer to object
within
control instead of just .value so if you can explain that'd be grand, but
thanks anyways.

"Bob Phillips" wrote:

Try

Set controls = Sheet1.OLEObjects
for each control in controls.Object
control.value = "Test"
next control


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"NateBuckley" wrote in message
...
Hello I have a larger version of this

Set controls = Sheet1.OLEObjects
for each control in controls
control.value = "Test"
next control


Having a problem where I can't find the property/method to change the
value
of the control object, as it appears a OLEObject does not contain a
method/prop called Value.

Just wondering how I can assign a value to a control like this?

All the controls on my sheet 1 are Control Textboxes, and I'm using
Excel
2003.

Thanks for any help you can offer.








  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default OLEObjects

Oops, my bad, that was what I meant!


"NateBuckley" wrote in message
...
Actually ignore my last thread,

although it didn't work that way, it did work this way

For each control in controls
control.Object.value = "Test"
next control

Thank you very much! :) Little confused why I have to refer to object
within
control instead of just .value so if you can explain that'd be grand, but
thanks anyways.

"Bob Phillips" wrote:

Try

Set controls = Sheet1.OLEObjects
for each control in controls.Object
control.value = "Test"
next control


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"NateBuckley" wrote in message
...
Hello I have a larger version of this

Set controls = Sheet1.OLEObjects
for each control in controls
control.value = "Test"
next control


Having a problem where I can't find the property/method to change the
value
of the control object, as it appears a OLEObject does not contain a
method/prop called Value.

Just wondering how I can assign a value to a control like this?

All the controls on my sheet 1 are Control Textboxes, and I'm using
Excel
2003.

Thanks for any help you can offer.







  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 146
Default OLEObjects

Not a worry sir, it lead me down the right path.

Thanks!

"Bob Phillips" wrote:

Oops, my bad, that was what I meant!


"NateBuckley" wrote in message
...
Actually ignore my last thread,

although it didn't work that way, it did work this way

For each control in controls
control.Object.value = "Test"
next control

Thank you very much! :) Little confused why I have to refer to object
within
control instead of just .value so if you can explain that'd be grand, but
thanks anyways.

"Bob Phillips" wrote:

Try

Set controls = Sheet1.OLEObjects
for each control in controls.Object
control.value = "Test"
next control


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"NateBuckley" wrote in message
...
Hello I have a larger version of this

Set controls = Sheet1.OLEObjects
for each control in controls
control.value = "Test"
next control


Having a problem where I can't find the property/method to change the
value
of the control object, as it appears a OLEObject does not contain a
method/prop called Value.

Just wondering how I can assign a value to a control like this?

All the controls on my sheet 1 are Control Textboxes, and I'm using
Excel
2003.

Thanks for any help you can offer.








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
error with oleobjects.add Bert[_7_] Excel Programming 5 May 2nd 08 12:30 AM
Oleobjects group box michael v Excel Programming 2 February 20th 06 07:52 PM
OleObjects and someproperties Kris Excel Programming 4 January 24th 06 03:02 AM
OLEObjects Roy[_8_] Excel Programming 1 May 6th 05 03:51 AM
OLEObjects .. again Roy[_8_] Excel Programming 3 December 17th 04 09:44 AM


All times are GMT +1. The time now is 08:52 AM.

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

About Us

"It's about Microsoft Excel"