View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JS2004R6 JS2004R6 is offline
external usenet poster
 
Posts: 22
Default Copying cells from one workbook to another.

You should be able to incorporate the code below into your existing code:

buswksDestination.Range("M1").EntireColumn.NumberF ormat = "d/m/yy"

Enter the line after your "busrngSource.Copy busrngDestination".

Hope that helps.

Regards,
James

"ndm berry" wrote:

I am currently using this code to copy from one workbook to another.

Set buswkbSource = Workbooks.Open("J:\business.csv")
Set buswksSource = buswkbSource.Sheets("business")
Set busrngSource = buswksSource.Cells
Set buswkbDestination = ThisWorkbook
Set buswksDestination = buswkbDestination.Sheets("business")
Set busrngDestination = buswksDestination.cells
busrngSource.Copy busrngDestination
Workbooks("business.csv").Close

The problem is that in column "M" of the source workbook is a list of dates.
I am using the UK date format, ie. 5th April 2005 as 5/4/05, unfortunately
the cells are copied using the US date format ie. 4/5/05 or as text if the
date is say 30th April 2005. PLease help!