Can I stop Excel program flashing on screen during run

P

PJ

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?
 
M

Masked Coder

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top