Thanks to you all for your suggestions, but maybe a I did not state the problem properly in my original question: It is vital that the dialog with the questions is MODAL. The call for the layout is in an 'if then else' structure, the if branch with manual input, the else branch an automated choice. If the questionaire layout does not hold the main code, then after the if .. then ..else I will not have the data complete in both cases and the program will not execute properly.
At present the code works okay, but after loadlayout "Questionaire" I coded a do while loop waiting for a handshake (proceed) from the questionaire and a doevents.
Do while proceed = false
doevents
loop
proceed is set to true in the questionare exit.
I can live with that, but it may be bad practise to do so.