+ Reply to Thread
Results 1 to 6 of 6

How to close a userform. My userform does not close right away.

  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    How to close a userform. My userform does not close right away.

    I have a macro which has a userform to collect data from the user. I have screenupdating turned off to speed up code. However, i turn the screenupdating on just prior to calling the userform and then turn it off just after the userform is "supposed" to be closed and unloaded.

    My issue is that I unload the userform but for some reason it still shows up on the screen.

    Please Login or Register  to view this content.
    the above is how to remove from memory and close the userform xyz..........right?

    Any ideas?
    Last edited by welchs101; 05-22-2012 at 07:39 AM.

  2. #2
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: How to close a userform. My userform does not close right away.

    when the "OK" button is pressed here is the code that is supposed to be run.

    Please Login or Register  to view this content.

  3. #3
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: How to close a userform. My userform does not close right away.

    It is. But what is the code that launches the form, including the screenupdating bit.

  4. #4
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: How to close a userform. My userform does not close right away.

    i launch the form using this command

    Please Login or Register  to view this content.


    i placed screen updating around this as shown below and it still did not help.

    Please Login or Register  to view this content.

  5. #5
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: How to close a userform. My userform does not close right away.

    I am confused, I cannot reproduce the problem here.

  6. #6
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,662

    Re: How to close a userform. My userform does not close right away.

    well, i dont know why but this works........

    so i assumed that my problem is that somehow i am not updating the screen as i should so while i turned on the updating of the screen prior to calling the userform i decided to put this in my code (see below). Here i am turning on updating just prior to unloading the form........

    THIS SEEMS TO WORK.........i dont know why ........i really dont why turning on screen updating prior to showing userform doesnt work but this did..........



    Please Login or Register  to view this content.

+ 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