'Workbook_SheetSelectionChange() dramaticly slowing down scrolling in large spreadsheet
If I add the following VBA function to ThisWorkbook in Excel, then I find scrolling around the spreadsheet becomes very slow and jerky. It is a large 50 sheet / 50MB spreadsheet with a lot of vlookup() type calls in it, as well as array formulae {}. Even if I comment out the one line of code, scrolling around the spreadsheet is still very slow. If I comment out the entire Sub, then I get normal scrolling. I am trying to monitor when the user last did something to the spreadsheet.
Option Explicit
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
LastUserActivity = Now()
End Sub
Any idea what may be going on?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
