Connecting Tech Pros Worldwide Forums | Help | Site Map

Halt Execution / Wait for Input Problem.

Expert
 
Join Date: Nov 2007
Posts: 126
#1: Jun 17 '09
Hello, VB'ers. I'm not an expert on VB. :)

During execution, I open a dialog (a form named 'frmMetaData').

Currently, I open frmMetaData as vbModal, but this locks out the user's ability to manipulate the window behind the dialog. I switched the modality to vbModeless, (via frmMetaData.show vbModeless) but what happens is the code keeps running after the show command, and it no longer waits for frmMetaData to be completed.

The code which follows the .Show() command depends on input from the user to work correctly. Users also should to be able to access the window behind the dialog.

What do I do?
Expert
 
Join Date: Nov 2007
Posts: 126
#2: Jun 17 '09

re: Halt Execution / Wait for Input Problem.


I have created a workaround to this. My solution was as follows:

I separated the code that followed the .Show command in a Public subroutine of its own.

I then put a Click() event on the "OK" button on the dialog which called the new Public subroutine.
Reply

Tags
dialog, halt, modal, vbmodal, wait