Hide/disable menu options thru vb code

jolly_83

akhil
Local time
Tomorrow, 03:21
Joined
Oct 22, 2008
Messages
16
I have used this code to disable the File menu cmd/controls in access 2003.

Application.CommandBars("FILE").Controls("NEW...") .Enabled = False
Application.CommandBars("FILE").Controls("EXIT").E nabled = False

In file menu the cmd/control before exit cmd/control shows the path of the .mdb file opened. tell me how to hide/disable this.

As i dont know how to refer this cmd/control. I can hide other cmd/controls of file menu as i know i can refer them as shown in code given above.
 
It is not possible to affect changes on the controls to which you refer. The attributes for these controls are set by Access at Run-Time and are Read-Only. You will have to create your own custom Menu Bar and add only the controls you wish to see, then set your database's Menu Bar to the custom Menu Bar you created.
 

Users who are viewing this thread

Back
Top Bottom