Solved

How to Add Multiple Menus

Posted on 2008-10-20
1
159 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

717 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