Hello all,
At the moment i am using VBA code that gives me a warning pop up prior to an expiry date. The only problem is that in the message it refers to the cell i.e B4 and not the contents of B4 which would be a name. i.e. It says "****EXPIRED DATE B4 PLEASE CHECK RENEWAL****
I would like to replace B4 in the message with the name i.e "john smith" in the cell B4.
The code im using is:
Private Sub Worksheet_Activate()
Dim i, LastRow
LastRow = Range("A" & Rows.Count).End(xlUp).Row
For i = 2 To LastRow
If Cells(i, "I").Value <= Range("M5") Then
MsgBox " **** EXPIRED DATE " & Cells(i, "B").Address(0, 0) & " " & _
" PLEASE CHECK RENEWAL **** ", vbCritical, "Alert"
End If
Next
End Sub
Thanks
Craig
Bookmarks