Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50298

[SOLVED] Test For Button Text in VBA

$
0
0
I am trying to manipulate button visibility dependingon whether there is text or not displayed in the button. The code looks like this:

Dim SCaption As String

For Each shpShape In ActiveSheet.Shapes
SCaption = ActiveSheet.Buttons.Caption
If SCaption <> "" Then
shpShape.Visible = True
End If
Next shpShape

The goal is to look at each button and if there is text in the caption then I will make the button visible.
I control whether there is text or not in other parts of the code.

Doesnt work - suggestions?

Thanks

Viewing all articles
Browse latest Browse all 50298

Latest Images

Trending Articles



Latest Images