View Single Post
  #1   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

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