Try ths code
Private Sub Workbook_Open()
Dim i, j, k As Long
Dim SWA1, SWA2, SWA3 As String
SWA1 = ""
SWA2 = ""
SWA3 = ""
Sheets("UPS").Activate
For j = 2 To Sheets("UPS").Range("a1").End(xlDown).Row
If Sheets("UPS").Cells(j, 2).Value <= DateSerial(Year(Now), Month(Now),
Day(Now)) Then
SWA1 = SW
Hi Ashish,
Thanks for replying but it is showing for only 28-April-2011 see what i want
to display the meassage which date has been expired eg.today date is 27
april ,so the message display for less than the today date or system date
for example
Product Date
1001 3-May-2011
1002 26-
Hi,
In my sheet there are three tab 1)UPS tab 2)Router tab 3)SMPS tab
so there are date column as well is there
my question :when we open the excel file it should prompt me the message the
date is going to expire on which tab
for example :suppose in UPS tab for product no 1002&1003 date is 26 Apr s