Need some help with excel 2013 and due dates pop-ups on opening

Sam_Manerker

New Member
Joined
Aug 1, 2017
Messages
6
Hello everyone !

basically need some help figuring out why this is not working like it should. will try and give a brief overview first.
want to check if a company renewal date is due and alert accordingly on opening of workbook. have put down code that i'm using as under :

Sub Workbook_Open() '(company name-b2:b17 and date-u2:u17 (range working with right now))
Dim bottomD As Integer
bottomD = Range("u" & Rows.Count).End(xlUp).Row
Dim c As Range
For Each c In Range("u2:u" & bottomD) ' i think this is the problematic line of code. (??)
If c >= Date And c <= Date + 3 Then
MsgBox c.Offset(0, -19) & " is due in " & c - Date & " days." '
End If
Next c
End Sub


It seems to work only on a few rows but others are neglected. I cant figure out why that's happening....
I got this code off the net to be honest and tweaked it a bit ! am not an expert in this by any means..
Any help will be greatly appreciated !! Thanks in advance guys !
 
hey fluff !!

Absolutely brilliant buddy !! works like a charm !! Thank you so so much for all ur help and patience with all this ! really really appreciate it ! one last stupid question, do i need to "close this thread" or something ? have no idea what needs to be done further.... Thank you once again for everything...u've been a real life saver for me !! God bless !
 
Upvote 0

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Glad to help & thanks for the feedback
& no the thread does not need to be closed.
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,269
Members
452,628
Latest member
dd2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top