what is the depth that you can have for while , wend loops

It seems the problem may be that from my routines for key stroke checking

I use a while <> KEY , wend loop to test for an " exit to the loop

but as options go down into sub menu's , each need to be exited and the above menu's are looking for thier exit

is this the best method for multilevel menu structure ?

is it likly this structure is causing my issues ?

cheers

Sheldon