Consulting

Results 1 to 14 of 14

Thread: How to create the menu w/o the code as the attached file

  1. #1
    Banned VBAX Regular
    Joined
    Jul 2011
    Posts
    7

    How to create the menu w/o the code as the attached file

    Dear All,

    I have a file in the other forum. I do not know how they create the menu as I did not see any code to create the menu.

    Tks,

    lvl
    Attached Files Attached Files

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Why don't you ask them in that other forum?
    ____________________________________________
    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

  3. #3
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,728
    Location
    I don't have access to 2003, but here's a reference

    http://support.microsoft.com/kb/830502

    Create a custom command control on a menu

    The following example code creates a new command that is named Custom1 on the Tools menu of the Worksheet menu bar, and then runs the Code_Custom1 macro when you click Custom1:

    [vba]
    Sub menuItem_Create()
    With CommandBars("Worksheet menu bar").Controls("Tools")
    .Controls.Add(Type:=msoControlButton, Before:=1).Caption = "Custom1"
    .Controls("Custom1").OnAction = "Code_Custom1"
    End With
    End Sub
    [/vba]

    2007/2010 still work with CommandBars, but I don't really remember how to create thenPaul

  4. #4
    Banned VBAX Regular
    Joined
    Jul 2011
    Posts
    7
    Quote Originally Posted by xld
    Why don't you ask them in that other forum?
    Hi xld,
    The owner do not want to ans.

    lvl

  5. #5
    Banned VBAX Regular
    Joined
    Jul 2011
    Posts
    7
    Quote Originally Posted by Paul_Hossler
    2007/2010 still work with CommandBars, but I don't really remember how to create then
    Paul
    Thanks Paul,

    As you see the code in the file, there is no any code to create the menu.
    Then how they can create the menu when you open it, that is the thing I want to find the ans.

    lvl

  6. #6
    VBAX Tutor mohanvijay's Avatar
    Joined
    Aug 2010
    Location
    MADURAI
    Posts
    268
    Location
    See attached file
    Attached Files Attached Files

  7. #7
    Banned VBAX Regular
    Joined
    Jul 2011
    Posts
    7
    Hi mohanvijay,

    As you can see the attached file that there is no any code like:
    [VBA]Application.CommandBars(1).Controls.Add[/VBA]

    I want to find out how they add this w/o the code.
    Tks,

    lvl

  8. #8
    Banned VBAX Regular
    Joined
    Jul 2011
    Posts
    7
    Hi,
    I have found out how to do this with Macro 4.
    Tks,

    lvl

  9. #9
    Banned VBAX Regular
    Joined
    Jul 2011
    Posts
    7
    Hi,

    I have found out how to create this menu with macro 4.

    lvl

    How can I could not remove this file. Mod, pls help me to remove this file. Tks,

    lvl

  10. #10
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,059
    Location
    Why do you want the file removed?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  11. #11
    Banned VBAX Regular
    Joined
    Jul 2011
    Posts
    7
    Hi Aussiebear,

    I want to removed because I have found out the solution.
    Tks,

    lvd

  12. #12
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,059
    Location
    Since you have asked a question on a public forum, then why not supply the answer as well?

    For example is this the solution you found?

    Thanks, I have found out how to create this menu and hide it.
    1. Insert the MS Excel 4.0 Macro
    2. Write the code here. We can use AutoOpen to do something when this workbook open
    3. Create the menu by using macro 4.0 with the command: =ADD.MENU(10,Mymenu)
    4. Set password to protect this MS Excel 4.0 Macro sheet.
    5. Run the code to hide this MS Excel 4.0 Macro sheet.

    It's so easy, why I do not think about the macro 4 before raise the question.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  13. #13
    VBAX Expert CatDaddy's Avatar
    Joined
    Jun 2011
    Posts
    581
    Location
    just rude...
    ------------------------------------------------
    Happy Coding my friends

  14. #14
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,059
    Location
    Quote Originally Posted by lvd
    I want to removed because I have found out the solution.
    Sorry but that's not a good enough reason to remove this thread. It will stay public so that others may use the experience to learn from.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

Posting Permissions

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