The first argument for the PopupMenu method must be a Menu control. This error has the following cause and solution:
Use the name of a Menu control with at least one submenu as the menuname argument.