LuckyDPR
New Member
- Joined
- Aug 6, 2022
- Messages
- 12
- Office Version
- 2021
- Platform
- Windows
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If ActiveCell.Row = 1 Then Exit Sub
Application.EnableEvents = False
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
If Not (Application.Intersect(Target, Range("Product[Model]")) Is Nothing) Then 'Say Procedure First
'Statements
End If
If Not (Application.Intersect(Target, Range("Product[Serial]")) Is Nothing) Then 'Say Procedure Second
'Statements
End If
If Not (Application.Intersect(Target, Range("Product[DOP]")) Is Nothing) Then 'Say Procedure Third
'Statements
End If
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
in above code when worksheet_change event is triggered, it takes extra time (Say 2 Seconds) to run PROCEDURE First, whereas PROCDURE Second and PROCEDURE Third runs instantaneously, I have tried above procedures without any statement (DO NOTHING), still results are same, so it is not a problem with codes under these procedures