473,394 Members | 1,567 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

PopUp Menus

dfg
Hi...Just a quick question about popup menus. I have a menu popup using
the code below:

Private Sub fraAccBal_MouseDown(Button As Integer, Shift As Integer, X
As Single, Y As Single)
If Button = 2 Then
PopupMenu mnuHi
End If
End Sub

After then menu pops up, I click on an item, but nothing happens. Where
do I put the code to make things happen?

Thanks.

Jul 17 '05 #1
2 3949
> Hi...Just a quick question about popup menus. I have a menu popup using
the code below:

Private Sub fraAccBal_MouseDown(Button As Integer, Shift As Integer, X
As Single, Y As Single)
If Button = 2 Then
PopupMenu mnuHi
End If
End Sub

After then menu pops up, I click on an item, but nothing happens. Where
do I put the code to make things happen?


You put the code in each item's Click event. At Design Time, find an item
that is on the popup menu at its location on the form's main menu bar and
click on the item you want to code for... VB will take you to that item's
Click event code section automatically.

Rick - MVP
Jul 17 '05 #2
Create a click event for each menu item
in the form code on which the menu is on

Private Sub mnuItem1_Click()
' do code
End Sub

Private Sub mnuItem2_Click()
' do code
End Sub

Alternatively, in your menu editor,
make the top level of the menu visible.
In the design window, you will see the
menu showup at the top.

Click on your menu/item to go to the code
when ur done, uncheck Visible in the menu editor

"dfg" <df*@dfg.net> wrote in message
news:y53ob.220769$9l5.115149@pd7tw2no...
Hi...Just a quick question about popup menus. I have a menu popup using
the code below:

Private Sub fraAccBal_MouseDown(Button As Integer, Shift As Integer, X
As Single, Y As Single)
If Button = 2 Then
PopupMenu mnuHi
End If
End Sub

After then menu pops up, I click on an item, but nothing happens. Where
do I put the code to make things happen?

Thanks.

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Yvan J. Gagnon | last post by:
I am currenly developing a web site using Macromedia fireworks, and am trying to figure out a way (through hand-coding) of attaching a javascript function (onClick="doit=false") to each of the...
3
by: Roger Withnell | last post by:
My simple popup menu code works in IE (Windows and Mac) but not in Safari. I use a onmouseover ShowMenu function and a onmouseout HideMenu function. Because Safari, unlike IE, recognises...
2
by: Sean Mullaly | last post by:
I have a custom Access menu with sub-menus and sub-sub-menus. (220 items). Right now I have created 220 Functions and attached each individual Function to the specific OnAction property. The...
0
by: B Dub | last post by:
I am merging two menus (a and b) into a third menu (c). Menu A is created by one control, and menu b by another. Each control is responsible for updating their menuitems enabled states and so each...
1
by: Roger Withnell | last post by:
My navbar is in a frame down the left hand side of the window. The frame is 150px wide and the navbar buttons are 100px wide. Hovering over the buttons displays popup menus to the right of the...
2
by: diogenes | last post by:
I have created many shortcut/popup (aka context, or right-click) menus for my application - instead of toolbars or standard drop-down menus. Within my custom menu, I am using...
1
by: Carl | last post by:
"Chuckk Hubbard" <badmuthahubbard@gmail.comwrites: Try creating the "main" popup menu before the sub-menus, and when instantiating the sub-menus, pass the main menu as the "master" instead of...
5
by: clincoln | last post by:
I have run into the problem of MS seemingly dropping support for custom popup menus in Access 2007. My app heavily uses popup menus and suddenly I can not even change a typeo in a popup menu or add...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.