// Excel

Detecting a Key Press in Excel VBA and Performing an Action

Example code needed to detect a change in a cell and respond accordingly

Private Sub Worksheet_Change(ByVal Target As Range)
'    MsgBox (Target.Address)
    If (Target.Address = "$B$5") And ([b5].Value = "") Then
    [d5].Value = ""
    End If
    
    If (Target.Address = "$B$5") And ([b5].Value <> "") Then
    FirmaKodSorgu
    End If
End Sub

 

// FEEDBACK

Was this useful?

Your rating shows how helpful this note is to other readers.

Was this useful?

Click the stars to rate.

Average rating 0 / 5. Total votes: 0

No one has rated this post yet. Be the first!

Sorry this post was not helpful.

Your feedback is valuable to us.

How can we make this post more helpful?

// JOIN THE CONVERSATION

Share your experience

Got a question, a different solution or a note to add?

// KEEP READING

One more note.

All posts ↗︎