Comparing two cells

  • Thread starter Thread starter Geoff
  • Start date Start date
G

Geoff

Hi,

Im very new to VB and would appreciate some help.

I need some code which compares two cells (AH1 & AI1) and if there is a
difference then the code runs a Macro (called DisplayCalendar)

Thanks
 
Copy below code in Worksheet Module (Right click on Tab , Click on
"View Code" , Paste below code)

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("AH1").Value <> Range("AI1").Value Then
Call DisplayCalendar
End If
End Sub

Regards
 
Back
Top