Results 1 to 3 of 3

Thread: [RESOLVED] Wait Until Form is Close Before Continuing

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2010
    Posts
    58

    Resolved [RESOLVED] Wait Until Form is Close Before Continuing

    So I have something like this:

    Code:
    For Each Entry In CheckedListBox1.CheckedItems
         SheetName = Entry.ToString()
         Form2.Show()
     
    Next
    but I don't want to continue the loop until Form2 is closed. I tried something like this:

    Code:
    For Each Entry In CheckedListBox1.CheckedItems
         SheetName = Entry.ToString()
         Form2.Show()
         Do
              If Form2.Visible = False Then
                   Exit Do
              End If
         Loop
    Next
    But that just froze everything and used up all my CPU.

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Wait Until Form is Close Before Continuing

    Try .ShowDialog instead of .Show

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2010
    Posts
    58

    Re: Wait Until Form is Close Before Continuing

    sweet, thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width