View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ranswrt ranswrt is offline
external usenet poster
 
Posts: 191
Default Date from DTPicker

I am trying to take the date from value of a DTpicker and put it into a cell
on a worksheet. When I do this I get the wrong date in the cell. For
example I take the date from DTPicker by using the following code:

dim subven(5,2) as variant
subven(1, 2) = DTPicker1.Value

and I put it into a cell by using

dim fcell as range
fcell=subven(1,2)

I get the wrong date in fcell. The date in fcell is always 1/0/1900. I
tried doing different number date formats in fcell and I get the same
results. I would like fcell to be in mm/dd/yy format if possible.

How do I get this to work?
Thanks