Programmaticaly hide controls in a custom toolbar

S

Silvio

How can I programmatically hide a button/control in a custom tool bar?

My tool bat name is Admin and the button is name is frmAdmin. I am trying to
make button visible/disabled or invisible/enabled depending on user log on
credentials.

Thank you,
Silvio
 
M

Marshall Barton

Silvio said:
How can I programmatically hide a button/control in a custom tool bar?

My tool bat name is Admin and the button is name is frmAdmin. I am trying to
make button visible/disabled or invisible/enabled depending on user log on
credentials.


Use the methods/properties of the CommandBar and
CommandBarControl objects (see VBA Help for details).

What you asked about might be something like:
CommandBars!Admin.Controls!frmAdmin.Visible = False
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top