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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSGBOX Trailing images

Status
Not open for further replies.

JazzyLee

Programmer
Jan 24, 2002
47
US
I am working with EXCEL 2000 and have created a userform to pop up so the user can select an account from a ComboBox. If no account is selected, I display a warning message letting the user know that an account is required. This warning dialog box is center screen and covers my original ComboBox. Needless to say, everyone seems to have a need to drag this box aside (don't ask me why) and in so doing, it leaves a shadowing trail of boxes from the original spot it was in to wherever it is dragged. Is there a way to not allow the box to be dragged using VBA codes or to drag and drop it cleanly? Any and all ideas will be much appreciated.
 
You may have Application.Screenupdating Set to False

OR

Inadvertently tried to select/Activate a hidden sheet

Ivan F Moala
xcelsmall.bmp
 
Hi JazzyLee,

This is usually a symptom of a system under stress. It is Windows (rather than Office/VBA) which is doing it and I think the answer is probably to get more memory.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at [url=http://www.vbaexpress.
 
TonyJollans,
If this is a possible memory problem, why does it happen only with my displayed messages and userform? I can pull aside all other messages with no problem. Just curious and of course, trying to learn. I will go through my codes to see if at any point I have Screenupdating set to False and try that avenue. Will post my results later. Thanks for the responses.
 
One way around this to to make the pop up warning msg form a dialgog form and set its movable property to FALSE. This way, your user cannot drag the form no matter how hard they try!!!

I haven't failed, I have just found 10,000 ways that it won't work!
 
Hi JazzyLee,

I'm no expert on this and memory is just a guess; I am fairly sure, though, that it is a lack of resources which means Windows cannot refresh the screen properly.

All I can really do is throw out some guesses. You imply the same thing happens on multiple computers. Is your code memory-hungry in some way, or could you have a memory leak? Alternatively, how are you displaying your warning message - is it a standard msgbox or your own userform? is it modal? do you have a tight processor loop?

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at [url=http://www.vbaexpress.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top