Monday, June 29, 2009

Hide menu bars of ms access database

Suppose we may want to hide all menu bars of access database (File, Edit Menu etc)

The following code is used to hide the menu bars.

Sub HideMenu()

'This will hide all menu bars and tool bars
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = False
Next i

'Showing and enabling command bar controls
Application.CommandBars("Menu Bar").Controls("Edit").Enabled = False
Application.CommandBars("Menu Bar").Controls("View").Enabled = False
Application.CommandBars("Formatting").Controls("Font").Visible = False

End Sub

No comments:

Post a Comment