This means that the Excel screen can look like it has "gone crazy" while the macro is running.One thing you may want to do with your macro to make it run faster and to prevent distracting flashes on the screen is to turn off screen updating while the macro is running.
Remove the line indicated to search for every instance.
The following does that for the first instance of the found text (matching the case). Caption = "Processing document " & i - 1 & " of " & doc To Open. Count End If 'Open each document Set Doc = Documents. Selected Items(i), _ Visible:=False, _ Addto Recent Files:=False) Set rng To Search = Doc. Screen Updating = True Msg Box "Processing complete" End If lbl_Exit: Set Doc = Nothing Set doc To Open = Nothing Set rng To Search = Nothing Exit Sub Err_Exit: Msg Box Err.
This tip (9151) applies to Microsoft Excel 2007, 2010, and 2013.
You can find a version of this tip for the older menu interface of Excel here: Turning Off Screen Updating.
The following macro lines will, respectively, turn off screen updating and then turn it back on in a VBA macro.
The idea is to use the first line near the beginning of your macro, and then use the second line near the end.Thus, the main body of your macro can do its work behind the scenes without the necessity of stopping to update the screen.is your source for cost-effective Microsoft Excel training.Before I start, I will admit I posted this in a forum that helps me a lot with another Office product, but as of this post they were not able to shed any light on this issue. I created the code below which does what it was written for, BUT the screen updates whilst it runs. Echo as a solution, but that is not recognised in Word 2007? In that case, I update the status bar message every time the code starts on the next sheet.