Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable an option on a Customised Menubar

Status
Not open for further replies.

roddy17

Technical User
Jul 27, 2001
49
CA
hi there,
i have a custom menubar with multiple commands. There is one though that i only want enabled (or visible if possible) when the user is viewing a report on the screen.
i thought of creating a separate menubar for this button (Close Report) but that would look less than professional.
Is there a way to disable a Menubar button? or even to make it not visible until the user is previewing a report?

thanks,
roddy
 
Hi roddy,

I hope the following code will help u
Dim CBarMenu
Dim CBarCtl

'Menu
Set CBarMenu = CommandBars("MainMenu")

'File Menu
Set CBarCtl = CBarMenu.Controls("File")

CBarMenu.Controls("File").Visible = True
CBarCtl.CommandBar.Controls("New").Visible = True

Sudashan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top