J
jonigr
I am having trouble transferring a “Date array†to a range.
In my XL sheet cells A1-A3 are pre-formatted as mm/dd/yyyy dates.
MyDateArray is a two dimensional (3, 1) array containing dates, say all
three are 05/11/2007.
When I try
Range("A1").Resize(1, 1) = MyDateArray(1, 1)
this works perfect and puts
05/11/2007
in A1, but
Range("A1").Resize(3, 1) = MyDateArray
gives me three times
01/00/1900
01/00/1900
01/00/1900
in A1-A3.
This is actually a much longer array and I prefer not to loop through all
the elements. Is there a way to transfer it to the sheet at once without
disturbing the dates? Thanks very much!
In my XL sheet cells A1-A3 are pre-formatted as mm/dd/yyyy dates.
MyDateArray is a two dimensional (3, 1) array containing dates, say all
three are 05/11/2007.
When I try
Range("A1").Resize(1, 1) = MyDateArray(1, 1)
this works perfect and puts
05/11/2007
in A1, but
Range("A1").Resize(3, 1) = MyDateArray
gives me three times
01/00/1900
01/00/1900
01/00/1900
in A1-A3.
This is actually a much longer array and I prefer not to loop through all
the elements. Is there a way to transfer it to the sheet at once without
disturbing the dates? Thanks very much!