i have a shipment tracking table with many records, each represent a shipment and in a different sheet i have an "Arrival Notification" template , with a command button to update template values and send automatic email to client once their shipment arrives
back to the table, column "Z" has the shipment arrival date column "AH" for the arrival notification .. it can have 2 values only (SEND, SENT) .. SEND for shipments with no notification sent yet , and SENT for notifications already sent
WHAT I WANT IS : for each cell in col "AH" with the value "SEND" only, once clicked to run the code CommandButton1_Click from the second sheet and then change cell value to "SENT"
*what i did was as below , but not working
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = Range("AH1").Column Then
Call CommandButton1_Click
Else
Range("AH" & Target.Row).Value = "SENT"
End If
End Sub