ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Redraw Application Window (https://www.excelbanter.com/excel-programming/311564-redraw-application-window.html)

Kevin

Redraw Application Window
 
How Do I cause the Excel Application Window to re-draw on
screen. I have a form in one workbook that is open. I want
to close the current workbook and open another (which is
working) but when the macro I am using runs the form from
the previous workbook is still visible. For whatever
reason the screen does not redraw. The workbook closes as
expected, but the screen does not refresh and the form
from the first workbook is still visible even though its
workbook has closed. I know it is a matter of just causing
the screen to refresh, but I am not sure how to make that
happen.

Thanks in advance.

Kevin

Tom Ogilvy

Redraw Application Window
 
I sounds like you have turned screen updating to off, so turn it back on,
then off again if that is what you want

Application.ScreenUpdating = True
Application.ScreenUpdating = False


or if it is on and this really is a problem then put in lines like (turn it
off, then back on to stimulate the screen update - throw in a couple of
doevents as well).

DoEvents
Application.ScreenUpdating = False
Application.ScreenUpdating = True
DoEvents
--
Regards,
Tom Ogilvy

"Kevin" wrote in message
...
How Do I cause the Excel Application Window to re-draw on
screen. I have a form in one workbook that is open. I want
to close the current workbook and open another (which is
working) but when the macro I am using runs the form from
the previous workbook is still visible. For whatever
reason the screen does not redraw. The workbook closes as
expected, but the screen does not refresh and the form
from the first workbook is still visible even though its
workbook has closed. I know it is a matter of just causing
the screen to refresh, but I am not sure how to make that
happen.

Thanks in advance.

Kevin




Kevin

Redraw Application Window
 
Thanks Tom! That fixed it!
-----Original Message-----
How Do I cause the Excel Application Window to re-draw on
screen. I have a form in one workbook that is open. I

want
to close the current workbook and open another (which is
working) but when the macro I am using runs the form from
the previous workbook is still visible. For whatever
reason the screen does not redraw. The workbook closes as
expected, but the screen does not refresh and the form
from the first workbook is still visible even though its
workbook has closed. I know it is a matter of just

causing
the screen to refresh, but I am not sure how to make that
happen.

Thanks in advance.

Kevin
.



All times are GMT +1. The time now is 06:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com