Clean Up Background While Running Macro

  • Thread starter Thread starter Henry
  • Start date Start date
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.
 
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
 

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

Back
Top