i'm popping up a form from a function and i want the code to stop executing further till a button on the form is clicked. Right now the form is popping up and the appln continues executing the code after that. Please help me

Recommended Answers

All 4 Replies

post your code...
will help much to understand

For i=0 to 10
.....
Form1.Show
Call function1(var_Name, intValue)
....
.....
...
Next i

This loop is present inside a class and has many function calls inside the 'for' loop. form1 is called inside this loop. I want the control back into this 'for' loop and continue with executing the further code on click of a button on the form1.

For i=0 to 10
.....
Form1.Show
Call function1(var_Name, intValue)
....
.....
...
Next i

This loop is present inside a class and has many function calls inside the 'for' loop. form1 is called inside this loop. I want the control back into this 'for' loop and continue with executing the further code on click of a button on the form1.

I think you mean
The execution of Call function1(var_Name, intValue) should be after closing or hiding Form1

If so, you can show the form Modally
that is Form1.Show vbModal The execution wait for Form1 to close or hide
In the form1's button,
You should hide or close the form

Try This!

commented: Very Helpfull +1

Thank you dude.... Its working.....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.