Consulting

Results 1 to 7 of 7

Thread: Solved: Custom Menu and Toobar Items for a single file.

  1. #1
    VBAX Tutor
    Joined
    Feb 2008
    Location
    New York
    Posts
    215
    Location

    Solved: Custom Menu and Toobar Items for a single file.

    Hello all,

    I need help with following things:

    1) In the menu bar, I need to display only 'File', and 'Help' Menu. Under 'File', I want to display only Open, Close, Save, Print, Print Preview, Exit. I want all other menu items hidden.

    2) In the Toolbar, I want to display only "print preview", and 'print' only.

    3) Most importantly, I want this feature only in a particular file, so that a user will see only these items in their Menubar and Toolbar but they would see their own Menubar and Toolbar in their other Excel files. I do not want this feature to affect any of their Excel application.

    4) I want to create a keyboard Shortcut (Ctrl+M) or a commandbutton that will enable a default Menubars or the Toolbars in the same file by prompting for a correct password.

    Can someone help me with this, or direct me where I can find this feature. Thanks.
    -u

  2. #2
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    Maybe this kb entry will point you in the right direction! kb entry by Killian
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  3. #3
    VBAX Tutor
    Joined
    Feb 2008
    Location
    New York
    Posts
    215
    Location
    Hello Simon,

    I noticed that the link shows how to Create a custom "Worksheet Find" toolbar. I am not able to modify the codes to suit it into my workbook to modify Menu bars and Toolbars since I can't write VB for this. Thanks.
    -u

  4. #4
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Maybe this one will give you some insight.
    http://vbaexpress.com/kb/getarticle.php?kb_id=809

    Search the forum and the kb. this is not an easy project for an inexperienced user.......it will require some research on your part and then come back here and ask specific questions. You will have to be careful or you will disable all of your menu items and be back here asking us how to restore them.

    If you are interested in a turnkey project......for fair money select consulting from the site links at the top of the page.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  5. #5
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    My thoughts too Lucas, it's just i was a bit grumpy yesterday so i ended up giving "find it yourself" answers!
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  6. #6
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    You could use code like this on the menus (untested)

    [vba]

    mpControls = Array("&File","&Help")
    For Each ctl In Application.Commandbars(1).Controls
    ctl.Visble = Not Iserror(Application.Match, mpControls,0)
    Next ctl
    [/vba]

    and use a more full array to reset them.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  7. #7
    VBAX Tutor
    Joined
    Feb 2008
    Location
    New York
    Posts
    215
    Location
    Thanks guys, I think that was too much too ask
    -u

Posting Permissions

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