View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Lily Lily is offline
external usenet poster
 
Posts: 28
Default Date Format returned from Userform to Excel worksheet

Thanks. I tried your suggestions. When I inputted 2/2/2002 I got
12/30/1899 on Range C3.

Lily

"JLGWhiz" wrote:

Try changing this:

Range("C3").Select
Selection.NumberFormat = "m/d/yyyy"

To this:

Range("C3") = Format(Range("C3").Value, "m/d/yyyy" )



"Lily" wrote in message
...
Hi,

I have a routine vb where I have a form (RXWfrmDate) with the date
(m/d/yyyy) for the user to pick a date for download to specific cell on
the
worksheet.

Sub RXWDate()
Dim DateIN As Date
Application.ScreenUpdating = False
RXWfrmDATE.Show
If frmCANCEL = True Then Exit Sub
ActiveWorkbook.Unprotect
Sheets("Reactor Water").Select
ActiveSheet.Unprotect
Range("C3") = DateIN
Range("C3").Select
Selection.NumberFormat = "m/d/yyyy"
Exit Sub
Application.ScreenUpdating = True
End Sub

However, the date that shows on Range "C3") after user input is
01/00/1900.

What am I missing?

Appreciate any help.

Thanks.

Lily



.