Wrong Code????

Ralph M

Well-known Member
Joined
Apr 16, 2002
Messages
502
Office Version
  1. 2016
Platform
  1. Windows
When the user enters data into a Column, I have Code to check the date in the Cell "AA4" and then MsgBox if the Date is expired. Here is the Code I am trying to use.

If Target.Column = 27 And ActiveSheet.Range("$AA$4") < Now() then
msgbox "Date not good"
end if

My problem is, I happen to have 10/2/11 in the Cell "AA4", when I try to enter data, I get the MsgBox.
I shouldn't get the MsgBox until tomorrow 10/3/11.

If I put the date 10/1/11, I do not get the MsgBox. The user may also change this date.
Any Help will be appreciated.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,224,564
Messages
6,179,547
Members
452,925
Latest member
duyvmex

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