Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== If...End If ====== ===== Excel ===== <code vb> If Target = Worksheets("Sheet 1").Range("C2") Then ' do something End If </code> ===== Access ===== <code vb> Private Sub UpdateAgeNow() If IsNull(tbDate.Value) Then tbAgeNow.Value = 0 Else Dim ageNow As Double ageNow = dateDiff("d", tbDate.Value, Now) / 365 tbAgeNow.Value = Round(ageNow, 2) End If End Sub </code> docs/programming/office_vba/if_end_if.txt Last modified: 2008/08/03 00:25by 127.0.0.1