You can pass the reference to the menubar in your main VI or in the main VI get the item tag of the selected menu item and pass that. For an easy exercise on passing a menu reference, open the shipping example called Menu Selection Demo, select everything inside the while loop except for the stop control and go to Edit>Create SubVI. The subVI created will have a single front panel control that is the reference. The modified program will run just like the original except the menu handling is done in the subVI. A menu refnum is also one of the controls on the Refnum palette so you can also create a subVI from scratch.