?
Solved

How to Add Multiple Menus

Posted on 2008-10-20
1
Medium Priority
?
160 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 2000 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month9 days, 11 hours left to enroll

762 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