Posts by tenaciousjacket

    Hi all,


    I'm using the following to build a popup box that prompts me when something is expired (from another thread)


    Code
    Private Sub Workbook_Open()
    Dim i As Integer, expire As String
    For i = 4 To [D65536].End(xlUp).Row
    If (Cells(i, 4).Value - Date) <= 10 And (Cells(i, 4).Value - Date) >= 0 Then
    expire = expire & "- " & i & vbCrLf
    End If
    Next
    MsgBox "Items on the following rows are due to expire:" & vbCrLf & vbCrLf & expire & vbCrLf & "Please action.", vbInformation
    End Sub



    But I can only get it to work when the expiry dates are in the D column. When I change the For i = 4 To [D65536].End(xlUp).Row to For i = 4 To [E65536].End(xlUp).Row it just ends up not working properly. How would I change the above to reflect a change in where I want to submit the expiring column?


    Many thanks in advance!