Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I pause a sub? 3

Status
Not open for further replies.

demoniac

Programmer
Jun 14, 2001
63
US
I'm having a sub call another form, and I need that sub to pause until the other form closes.

(For example, they enter bad data in a form, click the button, and it pops up a little warning window, and I want the code for the button click to pause until it gets the result from the warning window)

Any help would be appreciated :eek:)

Thanks,
demoniac
 
Open the other form using the vbModal option. The code will stop until the form closes. For example . . .

Code:
form1.show, vbmodal

- Jeff Marler B-)
 
When I try to use that, it gives me a type mismatch for some reason. Any idea as to why?

Thanks,
demoniac
 
Don't use the comma between 'show' and 'vbmodal'. Instead type...

form1.show vbmodal

The comma is telling VB that the parameter you're entering is a form reference (which is why it is giving you a mismatch error).
 
Opps . . . sorry, I'm having a bad typing day. Thanks for the correction shepherd! - Jeff Marler B-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top