Excel workshhet updating macro

Rated 3.83/5 based on 757 customer reviews

Copy this macro into a regular code module, then select cell(s) on any worksheet, and run the macro to freeze all the sheets. It doesn't matter which worksheet or which cell is selected before you run this macro.

Your macro can access any cells in the workbook, unless the worksheet containing the cell is hidden.

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.

Click Yes to go ahead with the unfreezing, and click No to cancel. Activate Else 'do nothing End If exit Handler: Application.

In this screen shot, row 5 is selected, so rows 1 to 4 will be frozen on all sheets, if the Yes button is clicked. Screen Updating = True Exit Sub err Handler: Msg Box "Could not freeze all sheets" Resume exit Handler End Sub Use this macro to unfreeze all the sheets in the active workbook.

Leave a Reply