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
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
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
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
Hi xld,Originally Posted by xld
The owner do not want to ans.
lvl
Thanks Paul,Originally Posted by Paul_Hossler
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
See attached file
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
Hi,
I have found out how to do this with Macro 4.
Tks,
lvl
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
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
Hi Aussiebear,
I want to removed because I have found out the solution.
Tks,
lvd
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
just rude...
------------------------------------------------
Happy Coding my friends
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.Originally Posted by lvd
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