View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Set Cell.Value to the Formated value

If you want to keep it a date, then you're going to have to live with the way
excel does it. Then you can reformat it later.

If you can live with the value being text, you could use what Joel suggests
(rename to .txt and specify that field as text).

But in any case, you'll want to make sure that the field is brought in as the
correct date (or representing the correct date).

If I save a field in mdy format (01/02/03) and you open that file and import the
field and your windows date settings are not mdy order, you may see something
that looks like a date--but it won't be the one I meant.

Captain Nemo wrote:

Hi All -

Simple one I think, but I can't connect the dots.

Cell.value is a date with custom number formatting. File is saved off
to tab delimited text.

When reopened in Excel, Excel default formats the dates, as the format
didn't stay with the file.

Not what I want. How to I get around it? I'm thinking I have to change
the date to a string and prepend an apostrophe.

But what I'm thinking ain't working.

Thanks in advance.

...best, Capt N.
--
Scream and Shout and Jump for Joy! I was here before Kilroy!

Sorry to spoil our little joke. I was here but my computer broke.

...Kilroy


--

Dave Peterson