excel 2013 to excel 2010 formula

Mikeymike_W

Board Regular
Joined
Feb 25, 2016
Messages
171
Hi Everyone,

I had created a form using excel 2013 but now need to recreate the same form in excel 2010.

I have just about finished, just copied and pasted all the code over.

There is one formula (so far that worked in 2013 but does nothing now so was wondering if there is something I need to change for 2010?

If Target.Address(0, 0) = "G10" Then
If IsDate(Target.Value) Then
If Target.Value < DateAdd("m", -4, Date) Then MsgBox "The CT Scan is more than 4 months old", , "CT Date"
Target.Select
End If
End If

Then should tell the user if the date is more than 4 months from todays date but it does nothing now.

Thanks in advance for all your help,

Mike
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
I assume that is a Worksheet_Change code. If so, it works fine for me in Excel 2010.

Perhaps your 'Events' have become disabled. In a standard module put this short macro & run it, then try again.

Code:
Sub EE()
  Application.EnableEvents = True
End Sub
 
Upvote 0
Hi Peter,

Thanks for your quick response.

It seems you are right, working a charm now.

Thanks again and all the best,

Mike
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

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