Solved

How to Add Multiple Menus

Posted on 2008-10-20
1
156 Views
Last Modified: 2010-04-30
All im trying to do is creating multiple menus like we create multiple forms with 1 form so the same thing how to do with menus
0
Comment
Question by:BILAL69
1 Comment
 
LVL 7

Accepted Solution

by:
FER_G earned 500 total points
ID: 22760478
Adding menus at runtime is handled in the exact same way as adding any control at runtime.
First you have to create a control array at design time, then at runtime you just load the new controls into the array. Steps...
# Open Menu Editor&
# In the editor add a main menu, add a submenu (mnuAddM).
# Set its index property to 0. By setting its index property, you tell VB that you want this menu to be the first element in the control array.

At runtime, you just do...
Private Sub Form_Load()
      mnuAddM(0).caption = "Added 1"
      Load mnuAddM(1)
      Load mnuAddM(2)
      mnuAddM(1).Caption = "Added 2"
      mnuAddM(2).Caption = "Added 3"
End Sub

.....

FerG
Saludos
--
Ing. Fernando D. Giletta
San Fco. Cba. Argentina.

0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now