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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling a macro from a menu item

Status
Not open for further replies.

BarryG

Programmer
Nov 19, 1999
23
0
0
US
I have a controlbutton object attached to a menu. The OnAction property works well if I do a straight call to a Sub procedure. However, I have a different Sub procedure that takes arguments. When I try to place 'Call ' in front of the Sub name in the OnAction property, the macro is not found. Is there a way to call a procedure with arguments from a control button?

Thanks in advance,
Barry
 
Thanks Joao.

The only way to accomplish this was to use the Application.Caller method to determine which menu item was being clicked. This method returns and integer that indicates the menu index.

Thanks for your suggestion.
Barry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top