VBA for Excel 2011 no longer handling dates since around December time

I have a macro originally written in Windows Excel, but I converted it to Mac 2 or 3 years ago and it's been running happily on a monthly basis until the first time I tried to use it in December.

Processing is dependent on date, but it now crashes because it cannot recognise the date.  I've tried formatting the cell in different ways, using cdate to convert the text to a date, and using value2 but nothing works.

I'm in the UK and my dates are formatted accordingly.  Originally I used Custom format against the cell to show it as ddd dd/mm/yy.  The cell would then show Sun 30/11/14, for example.  In the input box at the top of the screen I can see the date value of 30/11/2014.

In VBA, if I refer to activecell.value and try to load it into a date variable, or display it in an input box I get '30/11/', and it really has lost the year.  If I compare the year in this value to the year today, for instance, it fails with invalid format.  

Wondering if my spreadsheet had somehow become corrupt, I closed it down and tried to build a simple similar process in a new workbook - still the same problem.  I'm on Excel 2011 14.4.7, and my operating system is OS X Yosemite 10.10.1.

It feels like I'm the only one experiencing any problems, and this wasn't the only problem I started experiencing in December, but I've been able to work around the others.

It feels like this happened when I went to the OS X Yosemite but I can't be sure.

Any ideas?

Thanks in advance

Answer
Answer

This is known bug with some of the region settings, working OK when you use the Dutch region but not for example when you use the French settings

Got one user that fix it by running this in the Terminal window

defaults write NSGlobalDomain AppleICUDateFormatStrings -dict 1 dd/MM/yy

I hope they fix it soon

Regards Ron de Bruin
http://www.rondebruin.nl

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated September 30, 2021 Views 748 Applies to: