Active screenupdating false

There are certain errors for which Excel does not stop and report the fault; instead it terminates the current function and continues with the next statement in the calling routine.

Screen Updating = True End Sub The following VBA code example clears the color in all the cells on the worksheet by setting the Color Index property equal to 0, and then highlights the row and column that contain the active cell, within the current region by using the Current Region property of the Range object. Screen Updating = False With Active Cell ' Highlight the row and column within the current region Range(Cells(. As far as I have found now, it has something to do with the active cell before deactivating screen update, being the same as after reactivating screen update.This Workbook should be active at the end of the procedure, but it is not.The only way to circumvent this seems to include ".select" prior to the line causing the error. Well, I think, it is because after the second run, the focus might remain with a chart and not anylonger at any cell.Is there any way executing the below code without the screen-flickering?

Leave a Reply