Try changing the first sub to this:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim l As Long
Dim bEmail As Boolean
bEmail = False
If Not Intersect(Target, Sh.Range("C:C")) Is Nothing Then
For l = 2 To Sh.Range("C" & Rows.Count).End(xlUp).Row
If Not Sh.Range("C" & l) <= Sh.Range("D" & l) Then
Sh.Range("C" & l).EntireRow.Hidden = True
ElseIf Sh.Range("C" & l) <= Sh.Range("D" & l) Then
bEmail = True
End If
Next l
If bEmail = True Then Call SendEmail
Sh.UsedRange.EntireRow.Hidden = False
End If
End Sub
Good training materials (but probably not samples) can be found here: http://www.excelforum.com/excel-prog...materials.html
Most (but not all) vba programs are fairly specific to their application. But if you read through the training material and ask questions on this forum I bet you can get through it. What you're asking for sounds pretty straight forward.
Bookmarks