
Signature
Regards,
Nigel
nigelnospam@9sw.co.uk
>I have some Label controls placed on a Worksheet. I want to update
> the captions using the outputs from an optimization model. However it
[quoted text clipped - 25 lines]
>
> End Sub
> shp.TextFrame.Characters.Text = "TestText"
>
[quoted text clipped - 33 lines]
>
> > End Sub
Nigel,
Thanks for the info, but...
It didn't work. Since they are Label control Objects I tried:
shp.TextFrame.Characters.Caption = "TestText"
That didn't work either.
I then essentially did a semi-random walk though the Object Classes
and declaring shp as Type OLEObject and cycling through the OLE
Objects in the workbook returned the Label names. Experimentation led
me to:
MsgBox shp.Object
Which actually spit out the labels. However the Object property is
read only. So I'm still stuck.
Any other ideas? (BTW, would it be easier to delete the Label
controls and replace them with Text Box drawing objects?
SteveM
Nigel - 28 Jan 2008 18:19 GMT
MsgBox shp.TextFrame.Characters.Text
Works for me if you using worksheet form control labels.
For activeX objects you can get the caption as you would on a UserForm
Sheets("Sheet1").Label1.Caption

Signature
Regards,
Nigel
nigelnospam@9sw.co.uk
>> shp.TextFrame.Characters.Text = "TestText"
>>
[quoted text clipped - 58 lines]
>
> SteveM