Hi,

I like to write a macro that pasts csv data from the clipboard. The data containt dates and times.
If I just past the data and use the text to columns feature the dates are store as text and not as dates.
If I use paste special unicode text it is ok.
So far so good...
Now I wanted to record a macro for this, while recording everything goes great, but when I run the macro I have the same problem with the dates.

The data looks like:
18/05/2009 13:35:13;4528.360;15.047;209.800;2723.064;912.288;237.864;13.651
18/05/2009 13:37:44;4479.307;15.215;210.000;1775.464;701.753;237.401;10.615
18/05/2009 13:40:44;4242.116;15.416;210.200;3225.132;1188.307;237.618;5.983
18/05/2009 13:43:44;1267.916;15.544;210.300;648.643;375.480;236.691;3.618
18/05/2009 13:46:44;841.966;15.601;210.400;508.730;401.654;236.459;3.775
18/05/2009 13:50:14;810.299;15.652;210.400;447.340;340.740;236.995;3.594
18/05/2009 13:53:44;2108.640;15.702;210.500;1165.369;552.608;236.992;4.789
18/05/2009 13:56:44;4044.664;15.778;210.500;3147.561;1170.699;238.183;17.055
18/05/2009 13:59:14;4034.109;15.938;210.700;3009.552;1196.397;236.836;7.201
18/05/2009 14:01:44;1735.468;16.059;210.800;2811.580;1177.361;236.763;9.482
where the first data is the date/time and the others values of our solarsystem.

This is the macro I allready have:
    ActiveCell.Select
'    ActiveSheet.PasteSpecial Format:="Unicode Text", Link:=False, _
'        DisplayAsIcon:=False
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Copy
    ActiveCell.Offset(0, -2).Range("A1").Select
    ActiveSheet.Paste
    ActiveCell.Offset(-1, 1).Range("A1").Select
    Application.CutCopyMode = False
    Selection.AutoFill Destination:=ActiveCell.Range("A1:A26"), Type:= _
        xlFillDefault
    ActiveCell.Range("A1:A26").Select
    ActiveCell.Offset(0, 1).Range("A1").Select
    Selection.End(xlDown).Select
    ActiveCell.Offset(1, 0).Range("A1").Select
    ActiveWorkbook.Save
Now, if I paste special the data myself and then run the macro WITH the remarks on line 2 and 3 everything is good.
But when I try to do the paste special by the macro it gets screwed up. I can see that because the date/time is then aligned left instead of right.
After that, another program called sunnyreport, reads the xls file to create graphs. If the date/time isn't good the program doesn't work.

CSV data can be found at http://sdc.cindyenguy.be
XLS files are at http://sunnyreport.cindyenguy.be/xls/

Thanks