Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You didn't specify if your Labels are from the Forms or Controls toolbox
menu. But have a go with this: Sub LabelsText() Dim str As String str = "Some text" 'str = "" 'Forms menu 'On Error Resume Next 'in case no labels on sheet ActiveSheet.Labels.Text = str On Error GoTo 0 'Controls toolbox Dim ob As Object For Each ob In ActiveSheet.OLEObjects If TypeName(ob.Object) = "Label" Then ob.Object.Caption = str End If Next End Sub Regards, Peter "Spencer Hutton" wrote in message m... i have a sheet with over 100 labels on it. i need a statement that will set all of their captions to blank. this is what i have, but it is not working. can someone help For Each Label in Sheets("PickSheet").Labels Label.Caption = "" Next how can i rephrase this to make it work. TIA. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
X axis captions | Charts and Charting in Excel | |||
Cell values as captions | Excel Discussion (Misc queries) | |||
How do I put captions on Excel charts? | Charts and Charting in Excel | |||
reset menu captions | Excel Programming | |||
Clear Textboxes, Labels, and Checkboxes | Excel Programming |