Results 1 to 2 of 2

Thread: Hiding Toolbars

  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Louisville, Kentucky, USA
    Thanked 0 Times in 0 Posts

    Hiding Toolbars

    Good Morning,

    I would like to DIM several of the menus on the menu would I do that?

    Thanks in advance.
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Indianapolis, Indiana, USA
    Thanked 0 Times in 0 Posts

    Re: Hiding Toolbars

    Hi Roberta,

    When you say "DIM" I assume you mean gray-out, as in disabled.
    I'm sure others will have more to say on this topic, but here's my 2 cents: <img src=/S/2cents.gif border=0 alt=2cents width=15 height=15>
    To do this, you'll need to be sure Access has a reference set to the MS Office library (8.0 for Office 97 or 9.0 for Office 2000). In a module, create a function that sets the enabled property for the individual menu controls to false. Here's an example:<pre>Public Function DisableFileMenu()
    On Error Resume Next 'The File menu contains a few items
    Dim cmdbar As CommandBar 'that can not be disabled
    Dim cmdctl As CommandBarControl '(such as the MRU File list)
    Set cmdbar = Application.CommandBars("File") 'this is for the File menu
    Dim intCounter As Integer
    For intCounter = 1 To cmdbar.Controls.Count
    Set cmdctl = cmdbar.Controls(intCounter)
    cmdctl.Enabled = False
    End Function</pre>

    I hope this helps get you started. I'm sure you'll need to modify several things to meet your specific needs.
    <img src=/S/thumbup.gif border=0 alt=thumbup width=15 height=15>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts