Set lbl = CommandBars.FindControl(Type:= msoControlGauge) If lbl Is Nothing Then MsgBox "A control of type msoControlGauge was not found." Else MsgBox "Control " & lbl.Index & " on command bar " _ & lbl.Parent.Name & " is type msoControlGauge" End If
If lbl Is Nothing Then
MsgBox "A control of type msoControlGauge was not found."
Else
MsgBox "Control " & lbl.Index & " on command bar " _
& lbl.Parent.Name & " is type msoControlGauge"
End If
这个通过你说的方法不行吧