I did find a simpler way. It's certainly a less general answer but it works well enough for me at the moment.
Instead of using the code as I have seen in the examples where the submenu m is declared locally in App_Start():
B4X:
Sub App_Start(...)
' create top level menu entry
Dim TopMenu As Menu
TopMenu.Initialize( "Top Menu", "" )
mb.Menus.Add( TopMenu )
' Add submenu
Dim m As MenuItem
m.Initialize( "Sub Menu", "mSubMenu" )
TopMenu.MenuItems.Add( m )
I declare the sub menu as a process global variable:
B4X:
Sub Process_Globals
Private m1 as MenuItem
End Sub
Sub App_Start(...)
' create top level menu entry
Dim TopMenu As Menu
TopMenu.Initialize( "Top Menu", "" )
mb.Menus.Add( TopMenu )
' Add submenu
m1.Initialize( "Sub Menu", "mSubMenu" )
TopMenu.MenuItems.Add( m1 )
and when I want to change the prompt anywhere in the code: