ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Can I stop Excel program flashing on screen during run (https://www.excelbanter.com/excel-programming/303422-can-i-stop-excel-program-flashing-screen-during-run.html)

PJ[_4_]

Can I stop Excel program flashing on screen during run
 
I have some code that processes files in a directory and
extracts one piece of data. During the process a the
following is executed:
Workbooks.OpenText Filename:= _
strDirName & strItem, Origin:=xlMSDOS, StartRow:=2,
DataType:=xlFixedWidth, FieldInfo:= _
Array(Array(0, 1), Array(146, 1), Array(156, 1)),
TrailingMinusNumbers:=True

While this is running - it flashes on the screen.

Is there any way of stopping this?

arno

Can I stop Excel program flashing on screen during run
 
hi,

use
application.screenupdating = false
at the beginning of your code.

arno



Masked Coder[_5_]

Can I stop Excel program flashing on screen during run
 
This will work for the main Excel window

Put this at the beginning of your code:
Application.ScreenUpdating = False

and this at the end:
Application.ScreenUpdating = Tru

--
Message posted from http://www.ExcelForum.com


No Name

Can I stop Excel program flashing on screen during run
 
Thanks. That has worked a treat.
PJ
-----Original Message-----
hi,

use
application.screenupdating = false
at the beginning of your code.

arno


.



All times are GMT +1. The time now is 08:57 AM.

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