// 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

 

// JOIN THE CONVERSATION

Share your experience

Bir sorunun, farklı bir çözümün veya eklemek istediğin bir notun var mı? Giriş yapmadan da yazabilirsin.

// KEEP READING

One more note.

All posts ↗︎