Forum Discussion
naesio_maia
Jul 03, 2021Copper Contributor
VBA - Stopwatch
Hi Everyone, I'm looking for a solution to prevent VBA code from continuing to run when I click on another cell. It should stop the execution of the first cell that was running. Take a look at t...
HansVogelaar
Jul 03, 2021MVP
Right-click the sheet tab.
Select 'View Code' from the context menu.
Copy the following code into the worksheet module:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
stopTimer
End Sub