![]() |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
All times are GMT +1. The time now is 03:16 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com