Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserForm image stays when form is dragged to another area
I have a spreadsheet with about 8 worksheets. I display only one at a time,
the sheet displayed is based on procedures invoked on the spreadsheet and forms. When I load a form, I set Application.ScreenUpdating to false so the worksheets in the background can be unhid and unprotected to perform the procedure. When the form is closed all of the worksheets except one is re-hidden and all are reprotected. I noticed when I use Office 2003 an image of the form remains if the user drags the form to another location on the screen. It doesn't disapear until the form is closed or the user performs a click commandbutton. I know the problem has to do with screen updating being disabled but I can't figure out how to "refresh" the screen when the user finishes dragging the form. I tried "mouseup" thinking when the user releases the form it would invoke an event to turn screen updating on and then turning it back off, but that didn't seem to work. Any ideas? Thanks Brad Smith |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserForm image stays when form is dragged to another area
Just before you show the form, set screenupdating to true. Within each
control's procedures, tuen screenupdating to false, run the task, then turn it back to true. "Microsmith" wrote: I have a spreadsheet with about 8 worksheets. I display only one at a time, the sheet displayed is based on procedures invoked on the spreadsheet and forms. When I load a form, I set Application.ScreenUpdating to false so the worksheets in the background can be unhid and unprotected to perform the procedure. When the form is closed all of the worksheets except one is re-hidden and all are reprotected. I noticed when I use Office 2003 an image of the form remains if the user drags the form to another location on the screen. It doesn't disapear until the form is closed or the user performs a click commandbutton. I know the problem has to do with screen updating being disabled but I can't figure out how to "refresh" the screen when the user finishes dragging the form. I tried "mouseup" thinking when the user releases the form it would invoke an event to turn screen updating on and then turning it back off, but that didn't seem to work. Any ideas? Thanks Brad Smith |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserForm image stays when form is dragged to another area
turn on the screenupdating
show your form turn off the screenupdating Microsmith wrote: I have a spreadsheet with about 8 worksheets. I display only one at a time, the sheet displayed is based on procedures invoked on the spreadsheet and forms. When I load a form, I set Application.ScreenUpdating to false so the worksheets in the background can be unhid and unprotected to perform the procedure. When the form is closed all of the worksheets except one is re-hidden and all are reprotected. I noticed when I use Office 2003 an image of the form remains if the user drags the form to another location on the screen. It doesn't disapear until the form is closed or the user performs a click commandbutton. I know the problem has to do with screen updating being disabled but I can't figure out how to "refresh" the screen when the user finishes dragging the form. I tried "mouseup" thinking when the user releases the form it would invoke an event to turn screen updating on and then turning it back off, but that didn't seem to work. Any ideas? Thanks Brad Smith -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Printing spreadsheet print area to 1 page fails to shrink image en | Excel Worksheet Functions | |||
VBA to display image on a form - image is defined in Range Name | Excel Programming | |||
Prevent UserForm on top of a worksheet from being dragged around screen | Excel Programming | |||
Help! Animated gif-image in form does not show animation when form loaded | Excel Programming | |||
Set Print Area = Image?? | Excel Programming |