View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sascha[_2_] Sascha[_2_] is offline
external usenet poster
 
Posts: 2
Default Wrong date-formating while using data fields?

Hello,

I have the following problem:
If a call the following makro:

Public Sub Test()
Dim arrTable As Variant
Dim ws As Worksheet

Set ws = ActiveSheet

arrTable = ws.Range(ws.Cells(1, 1), ws.Cells(2, 2))
ws.Range(ws.Cells(1, 1), ws.Cells(2, 2)) = arrTable
End Sub

and in Cell(1,1) is a date in European Format (24.12.2004)
the data field arrTable writes the date in American format (12/24/2004)
back.

This does not happen, if I don't use date field, but normal variables.
On my computer I habe Excel 2000 and Excel XP. It only happens with
Excel XP, but
works right for Excel 2000.
The Country code on my computer is "German".

Can anyone help me?


Thanks,

Hermann