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

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!

Comments
Very Helpfull
This question has already been answered. Start a new discussion instead.