How can I change the text of a popup menu? My user will select a name from a vbgrid. I want that name to be combined with the menu option ie user select JOHN S. then menu item becomes Add more info more JOHN S. Any ideas?
Printable View
How can I change the text of a popup menu? My user will select a name from a vbgrid. I want that name to be combined with the menu option ie user select JOHN S. then menu item becomes Add more info more JOHN S. Any ideas?
Are you looking to change the text on a pre-defined menu item, or add a new menu item?
The following code is a example of how to add menu items:
This is assuming you have a menu item called menuItem1 and its indexed (Zero is fine for the index).Code:Dim ctr as Integer
For ctr = 1 to 5
Load menuItem1(ctr)
menuItem1(ctr).Caption = "Menu " & ctr
menuItem1(ctr).Visible = True
Next
If you want to change a predefined menuitem, just use MenuItem.Caption = "JOHN S." for example.
Hope this helps.
Michael Woolsey
To change it's text use:
Code:MyMenu.Caption = "hello"