Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Mac Excel for 2004 macro date problem
I am running the following portion of a macro that should return the date for
the end of the previous month: dt = Format(EoMonth(Date, -1), "mmmm d, yyyy") This works correctly when I first open the workbook and run the macro for the first time. However, if I keep the workbook open and run the macro again, it will return the date that's four years and one day too early. This appears to be a problem with the 1904 Mac date, but I have unchecked the 1904 date system option in the excel preferences for this workbook. Can I add a line of code to set the date for the application to not use 1904, so it runs consistently? Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Mac Excel for 2004 macro date problem
Hello Lori Add this line to your to your macro code.. ActiveWorkbook.Date1904 = Fals Sincerely Leith Ros -- Leith Ros ----------------------------------------------------------------------- Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846 View this thread: http://www.excelforum.com/showthread.php?threadid=49776 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Protecting a Macro on a Mac using Excel 2004 | Excel Worksheet Functions | |||
Date Picker for Mac Excel 2004 | Excel Programming | |||
I can't format 01/19/2004 to read January 19, 2004, please help!! | Excel Discussion (Misc queries) | |||
Excel 2004 Can't Disable Auto_Open Macro. What Now? | Excel Programming | |||
Use VBA to replace 2002 by 2004 in Date | Excel Programming |