bamaisgreat
Well-known Member
- Joined
- Jan 23, 2012
- Messages
- 831
- Office Version
- 365
- Platform
- Windows
Is there away to execute a macro after selecting a few certain cells???
You may want to set a flag to true as soon as the pointer enters the Worksheet_SelectionChange event and set it to false when your macro has completed doing its thing.
In a module enter
Public fRecursive as Boolean
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Target.Address = "$J$15,$K$15:$K$16,$L$20" Then
fRecursive = True
' Rest of code here or call another sub
End If
fRecursive = False
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$A$4,$J$10,$S$13" Then
Call finalizing_by_qc
End If
End Sub