MsgBox & Form Dragging

Mike E Golding

Board Regular
Joined
Mar 7, 2002
Messages
71
I have trouble with both my Msgboxes and my forms in that when I move them around on the screen they leave a trail behind them and I feel that I must have upset a default setting but cannot pin it down. Help would be nice. Thank you. Mike
 

Some videos you may like

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

AgentSmith

Well-known Member
Joined
Mar 8, 2004
Messages
575
It could be that you've got Windows set to show the contents of windows when you drag them. You can switch this off if you prefer. I'm not sure if this varies depending on which version of Windows you use, but here's how to do it in Windows 2000:

Go to the desktop
Right-click the desktop and select "Properties"
Go to the "Effects" tab
Remove the tick from the option labelled "Show window contents while dragging"
Press the "OK" button

Having done this, dragging a window will show you an outline of the window as you drag.
 

Mike E Golding

Board Regular
Joined
Mar 7, 2002
Messages
71
Hey Mike?, thanks for the thought it must be somewhere along the line but now if I drag a msgbox it will only show the outline as you said and when I stop it willshow the full job. Only thing is it leaves it's clone behind in the original position and continues to do that each time I stop. I can only wipe them out by closing the last one whereby they all close.
Crazy life isn't it?
Although I have had office 2000 for a number of years and XP for a year I never use either because I thought I know what I'm doing with WIN98 SE and Excel 97. There's no fool like an old fool. Feel I can be a bit of a fool at 70. Just thought that maybe if I re-boot I may be lucky. Thanks for your help, I'm really grateful. Mike E Golding
 

AgentSmith

Well-known Member
Joined
Mar 8, 2004
Messages
575
It is supposed to leave the original window alone while dragging, and only show you an outline of where you're moving it to. The problem is that the original window is left behind. Very odd, that. A reboot may help (since it is the secret M$ fix everything trick!), but this could be a driver issue. Have you installed the latest drivers for your graphics card? That's worth a go.
 

Mike E Golding

Board Regular
Joined
Mar 7, 2002
Messages
71

ADVERTISEMENT

Hi Mike, it's good to get another view sometimes. Can get too bogged down and not see the woods for the trees. I fitted a wireless keyboard and mouse a few weeks ago and haven't moved any messages boxes since. Yuk I feel a long session coming on but I also think that it won't be a problem so not going to get up tight about it. I'll ignore it until maybe it will go away. You're right about the re-boot and hope, but it does put one on the right track at least sometimes. Thanks again and I do appreciate your help. MikeE.
Will also update the graphics card..Another good thought, thank you.
 

Tom Urtis

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,224
What you are describing happens when ScreenUpdating is set to False.
Make sure in your macros that before a Message Box, InputBox, etc is scheduled to appear, you predede that with
Application.ScreenUpdating = True
 

DRJ

MrExcel MVP
Joined
Feb 17, 2002
Messages
3,853

ADVERTISEMENT

Yeah I run into the same problem all the time. I wish there was a UserForm CanMove property that I would set to false so it couldn't move at all. Anyways. just set screenupdating to true and you will be fine.

i.e.

Code:
application.screenupdating = true
msgbox "hi"
application.screenupdating = false
 

DRJ

MrExcel MVP
Joined
Feb 17, 2002
Messages
3,853
I tried both of those and they work great. I like the API version since I don't need to put a message box in. This worked fine for Excel 2002. Do you know if there would be any issues with prior versions of excel (97 or 2000)?

Thanks again for the link.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,511
Messages
5,596,581
Members
414,079
Latest member
Frills

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top