colmkav said:
I cant seem to see where I can attach a file to this post.
That is why I gave you instructions for uploading to a file-sharing website.
colmkav said:
sounds like you are saying you think that VBA has a
separate fixed setting that can't be changed.
That is a wild guess based on a vague recollection. I have not
double-checked.
Regardless, I would think that Workbooks.Open (as you did originally) would
simply pass the information to Excel to open the workbook. Therefore, I
would not think that would cause the cell to look differently in Excel (if
that is what you mean), unless Workbooks.Open chooses a different default
format for dates. (Seems unlikely.)
In any case, even if the __appearance__ of the date is different, I would
expect the actual date value assigned to a type Double variable or viewed
with a Number format would be the same.
colmkav said:
1) in notepad the date appears like "2622","11-07-2012"
2) Both visually and in the code it is displayed as "07-11-2012"
(whereas manually opened it is "11-07-2012"
#2 is not explained precisely enough. Exactly what do you mean by
"visually" and "in the code"?
"Visually" in the Excel workbook when you look at the worksheet in Excel?
"In the code" how? Specifically what VBA statements are you using to see
the date "in the code"? Are you using type Date variables or type Double?
I usually avoid type Date because I have not liked how VBA interprets its
use in some contexts. (I forget the details.)
More importantly (perhaps; depends on context), what does Month(...the
date...) return in VBA?
I wonder if the __appearance__ is misleading and irrelevant, as long as the
__value__ is correct.