Application screenupdating false not working 1on 1 mature chat online
This can result in you not knowing whether the process is still running, but the easy answer to that is to use a progress indicator bar.
Screen Updating = True Exit Sub Err_Exit: Msg Box Err. Number End Sub If you don't want to have the flicker as the documents are opened, open the documents invisibly.
You won't be able to see what the macro is doing, but it will run faster.
Remember to set the Screen Updating property back to True when your macro ends.
Show = -1 Then Set o Frm = New frm Progress If doc To Open.
File Dialog(mso File Dialog File Picker) If doc To Open.
Range Dim o Frm As frm Progress Dim Portion Done As Double On Error Go To Err_Exit str Text To Insert = "Annual bonus rates for the last five years" str Text To Find = "Discharge Pack" Set doc To Open = Application.
You just have to set the range you have defined to the place where the text is to be inserted. Collapse 0 Exit Do 'If you only want to process the first instance Loop End With Doc. Thank you for the progress indicator code and the tip on how to do this better and, I am always keen to learn new things if it will help me in life. Example This example demonstrates how turning off screen updating can make your code run faster.