1

I've created a few userforms in a Excel workbook and whenever a user starts one I set Application.ScreenUpdating to false.

But when the user moves the userform around it always leaves a copy behind (see image)

enter image description here

How can I prevent this but still keep Application.ScreenUpdating set to false.

4
  • You can't - they're mutually exclusive. Why do you turn Screenupdating off as soon as you load the form?
    – Rory
    Commented Oct 15, 2015 at 11:58
  • For example: The user starts the function which fills the whole sheet with data (not the userform in the picture). I present them a progressbar for the whole process and disable the ScreenUpdating. The user moves around the progress bar for whatever reason and then sees multiple forms which doesn't look very pretty and maybe even confuses them to a point where they can't tell which one is the "active" userform. Another example: The user wants to add a new customer. For this, I make templates visible and select ranges etc. which I also wouldn't want them to see.
    – mariu5
    Commented Oct 15, 2015 at 12:08
  • I guess you are doing most of the work through the clipboard, with select, activate, copy, paste... Is that why you are disabling screen updating? If so, you solution is to drop this non-recommended method (there is always a way to do without it) and you will not need to disable screen updating.
    – A.S.H
    Commented Oct 15, 2015 at 12:27
  • The reason I use templates is because each customer column is heavily formatted. It is much easier to just copy and paste the template column when a new customer is being added instead of creating the new column via code. If it really isn't possible to solve my issue, I'll just move the ScreenUpdating = False right before the whole process of adding a new customer begins and set it back to True after it finished.
    – mariu5
    Commented Oct 15, 2015 at 12:49

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.