Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get the parameter property value from a custom menu item

Status
Not open for further replies.

richiepr77

IS-IT--Management
Jan 28, 2007
3
PR
I'm trying to return the value of a custom menu item from its parameter property and copy it to an unbound text field in a form. I've tried the following code with no success.

Function Menu1()
Me.txtMenuValue = Application.CommandBars("mnuCustom").Controls(1).Parameter
End Function

I've read in the Help section of the Parameter property, that If the parameter is set for custom controls, it can be used to send information to Visual Basic procedures.
 
How are ya richiepr77 . . .

This should work:
Code:
[blue]   Me.txtMenu = CommandBars("mnuCustom").Controls("[purple][b][i]ControlName[/i][/b][/purple]").Parameter[/blue]


Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top