+ Reply to Thread
Results 1 to 3 of 3

Make Modaless form wait for 'OK' click

  1. #1
    Forum Contributor
    Join Date
    09-03-2008
    Location
    Somerset, England
    MS-Off Ver
    XP, 2003, 2007 - depends on location
    Posts
    185

    Make Modaless form wait for 'OK' click

    Hey all,

    I have a form that I have to show Modaless (Due to needing other forms to be like this), but this particular one I would like to hold the macro until 'OK' is pressed. Is there anyway of doing this?

    Thanks.
    Ducks are better crispy...

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983

    Re: Make Modaless form wait for 'OK' click

    Have the macro show the form then end sub

    Have rest of code attached or called from the OK button
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Forum Contributor
    Join Date
    02-23-2006
    Location
    Near London, England
    MS-Off Ver
    Office 2003
    Posts
    770

    Re: Make Modaless form wait for 'OK' click

    You could send your macro into an endless DoEvents loop, checking to see if a certain Boolean variable had been set, and if so exit the loop. Then just use your form button to set that variable.

    EDIT or do what he said ^^^^^^^^
    If you find the response helpful please click the scales in the blue bar above and rate it
    If you don't like the response, don't bother with the scales, they are not for you

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1