View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Toby Erkson Toby Erkson is offline
external usenet poster
 
Posts: 32
Default Programmatically determine if a control is .VISIBLE or not.

How does one determine if a control (button) on a command bar (toolbar) is visible or not so it can be acted upon for an IF...THEN statement?

This bit works if the control is visible:
Visible = Application.CommandBars("PivotTable").Controls("Re fresh All").Visible

If the control is not visible then I get the following error:
Run-time error '5':
Invalid procedure call or argument

TIA!
Toby Erkson
Oregon, USA