View Full Version : VBA to assign formatting to a column?


laxster
06-28-2010, 07:18 AM
I have data that gets copied via macro from one area to another. However, when it copies, it converts the date format to a general format. I don't want users to have to then reapply a date format to the specific column. Is there a way I could assign a column's cells to be for a date using VBA after the data is copied?

chergh
06-28-2010, 10:36 AM
Put

Worksheets("SheetName").Columns("ColLetter").NumberFormat = "dd/mm/yyyy;@"


In the macro after the paste operation.