I don't recommend you to use a waiting loop.
A better approach will be similar to BjornF solution:
Code:
Sub Sub1
...
frmOptions.Show 'the dialog form
End Sub
Sub frmOptions_Close
result = textbox1.text
Sub2
End Sub
Sub Sub2
... 'Continue your program
End Sub