Clean Up Background While Running Macro

H

Henry

We are running a macro from a workbook that has data in
cells. When we run the macro, one part of the code is:

FileOpenName = Application.GetOpenFilename("Text Files
(*.txt),*.txt", 1, "Open FMS Text File")

which opens a dialog box.

We have set screeen updating to False.

When we run the macro, the original workbook is still
visible in the background.

Is there code we can use to "blank out" the background
while the macro is running? (We will still need to see the
Open File" dialog box.)

Thanks.
 
G

gitcypher

Try
ActiveWindow.Visible = False
That will hide the active workbook window, but Excel and its toolbar
(etc.) with stay visible. You'll just have a gray background, o
whatever your color is in windows.

Note: I'm not sure how hiding the window will affect your access to i
from within VBA, but it may have to be unhidden and hidden to mak
changes to any cells. It you're using the application.screenupdating
false, you should fine as long as it's appropriately placed in th
code.

-Gitcyphe
 
Top