Thread
:
Updating Properties of a Control on a Worksheet - THANK YOU DAVEPETERSON!
View Single Post
#
2
Posted to microsoft.public.excel.programming
Nigel[_2_]
external usenet poster
Posts: 735
Updating Properties of a Control on a Worksheet - THANK YOU DAVE PETERSON!
See my reply to your earlier post, your OP stated you were using form
(shape) objects! OLEObjects need to be treated differently. Glad it is now
sorted.
--
Regards,
Nigel
"SteveM" wrote in message
...
Nigel, et al.
Thanks Nigel for the ideas, but they did not seem to work. I did a
search on msoOLEControlObject in this group and came across something
Dave Peterson contributed back in 2001. The syntax is a little more
complicated but it works. Here are the guts:
Sub GetControls()
Dim shp As Shape
Dim ws As Worksheet, str As String
Set ws = Worksheets("Scenario Map")
For Each shp In ws.Shapes
If shp.Type = msoOLEControlObject Then
If TypeOf shp.OLEFormat.Object.Object Is MSForms.Label
Then
shp.OLEFormat.Object.Object.Caption = "Label Test"
End If
Next
End Sub
Reply With Quote
Nigel[_2_]
View Public Profile
Find all posts by Nigel[_2_]