Thread: Date Posting
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Date Posting

If you want to treat that cell like text, you could use:

Range("A1") = "'" & Format(date,"mmmm dd, yyyy")
or
with range("a1")
.numberformat = "@" 'text
.value = Format(Date,"mmmm dd, yyyy")
end with

if you want to treat that cell as a date:
with range("a1")
.numberformat = "mmmm dd, yyyy"
.value = date
end with


Jim May wrote:

In a new WB - Book1 - in the immediate window I type in:

x = now
? x
11/18/2007 10:25:29 AM

x =Format(x,"mmmm dd, yyyy")
? x
November 18, 2007

Range("A1") = x
===================================
Why does A1 display 18-Nov-07 (formula bar = 11/18/2007) ??

TIA,

Jim


--

Dave Peterson