dpaton05
Well-known Member
- Joined
- Aug 14, 2018
- Messages
- 2,352
- Office Version
- 365
- 2016
- Platform
- Windows
I have a sheet with 2 cells that get data entered, B18,B20. After B20 is updated, a sub runs. I also need another sub to run after B25 and B27 is updated.
This is the code to run the first sub. After B27 is updated I need another sub to run. Do I include a second instance of "if Not Intersect"?
This is the code to run the first sub. After B27 is updated I need another sub to run. Do I include a second instance of "if Not Intersect"?
VBA Code:
Private Sub Workbook_SheetChange(ByVal sh As Object, ByVal Target As Range)
Dim Req As Range, PO As Range, CancelReq As Range, CancelDate As Range
With Worksheets("Totals")
Set Req = Range("B18")
Set PO = Range("B20")
Set CancelReq = Range("B25")
Set CancelDate = Range("B27")
If Not Intersect(Target, PO) Is Nothing Then
Application.EnableEvents = False
If PO <> "" And Req <> "" Then Call UpdateEverySheet(Req, PO)
PO.ClearContents
Req.ClearContents
'Application.EnableEvents = True
End If
End With