Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
situation: I am created a sceduled task within an ACCESS
dB to export out information to a .csv network file share. The problem is that the date field is illegible it appears in date-time format and when opened appears as 2.00512E+13. The ACCESS export is always writing over the same file. Is it possible to create a macro within this network file share .csv which will format the columns, perform a LEFT (datefield,8) on the date field trimming off the time so that just the date appears as 20051231 and then format this date field to appear as 12-31-2005 and then sort the entire worksheet by date while assigning this macro to a smiley face as a custom command on the toolbar also with autoexec feature. The objective being that all users throughout the network will have a shortcut on their desktop pointing to the network .csv file share so the macro is invoked upon opening the file and the user can then look at a file which makes sense vis-a-vis the date field. Note: I attempted this but I was not able to save the macro to the .csv. WHen I reopened the .csv I receive an error message that the macro created cannot be found. Thank you very much in advance! |
#2
![]() |
|||
|
|||
![]()
It seems to me that if the dates in the Access generated CSV were formatted
in m/d/yyyy format you wouldn't run into the problem. Excel would translate the date-like text into actual Excel dates, then you wouldn't need any kind of macro. Is there a reason that can't be done? Regards, Ron |
#3
![]() |
|||
|
|||
![]()
This has not been possible to date but I will get back to
you after I recreate the ACCESS .csv export with actual data. Unfortunately I do not have the actual export with me and do not remember the format ACCESS is exporting out the date-time in the csv file. Thank you for such a quick response! -----Original Message----- It seems to me that if the dates in the Access generated CSV were formatted in m/d/yyyy format you wouldn't run into the problem. Excel would translate the date-like text into actual Excel dates, then you wouldn't need any kind of macro. Is there a reason that can't be done? Regards, Ron . |
#4
![]() |
|||
|
|||
![]()
A csv file is not application-specific, and contains only text anyway, by
definition. So there's no way for a macro to be in it. This sounds like Access is writing the date in a format that your Excel doesn't recognize as a date (depends on your regional settings). -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "n30" wrote in message ... situation: I am created a sceduled task within an ACCESS dB to export out information to a .csv network file share. The problem is that the date field is illegible it appears in date-time format and when opened appears as 2.00512E+13. The ACCESS export is always writing over the same file. Is it possible to create a macro within this network file share .csv which will format the columns, perform a LEFT (datefield,8) on the date field trimming off the time so that just the date appears as 20051231 and then format this date field to appear as 12-31-2005 and then sort the entire worksheet by date while assigning this macro to a smiley face as a custom command on the toolbar also with autoexec feature. The objective being that all users throughout the network will have a shortcut on their desktop pointing to the network .csv file share so the macro is invoked upon opening the file and the user can then look at a file which makes sense vis-a-vis the date field. Note: I attempted this but I was not able to save the macro to the .csv. WHen I reopened the .csv I receive an error message that the macro created cannot be found. Thank you very much in advance! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Playing a macro from another workbook | Excel Discussion (Misc queries) | |||
Date macro | Excel Discussion (Misc queries) | |||
How can I embed a macro into a function in excel? | Excel Worksheet Functions | |||
Macro and If Statement | Excel Discussion (Misc queries) | |||
Macro Formula revision? | Excel Worksheet Functions |