Programmatically determine if a control is .VISIBLE or not.
Well, good to see that I can stump some people :-)
Talked with a friend who's a VBA demi-god and here's what we got:
------------------------------------
....
Visible = isVisible("Refresh Data") 'Example of use
If Visible Then...
....
Function isVisible(sButton As String) As Boolean
On Error GoTo ErrorHandler
isVisible = Application.CommandBars("PivotTable").Controls(sBu tton).Visible
Exit Function
ErrorHandler:
isVisible = False
Exit Function
End Function
------------------------------------
Toby Erkson
Oregon, USA
|