PC Review


Reply
Thread Tools Rate Thread

DTpicker number format

 
 
ranswrt
Guest
Posts: n/a
 
      28th Jul 2008
When I use DTPicker control to put a date into a cell, it puts the wrong date
in. Do I need to change the number format in the cell or on the control? I
tried

DTPicker1.Value = Format(DTPicker1.Value, "mm/dd/yy")

and that didn't work.
Thanks
 
Reply With Quote
 
 
 
 
Jim Thomlinson
Guest
Posts: n/a
 
      28th Jul 2008
Why not just set the linked cell property of the control to a cell on the
sheet. Wht the sheet in design mode right click the control and select
Properties. In the Linked Cell property add the cell reference. See if that
fixes your date issue...
--
HTH...

Jim Thomlinson


"ranswrt" wrote:

> When I use DTPicker control to put a date into a cell, it puts the wrong date
> in. Do I need to change the number format in the cell or on the control? I
> tried
>
> DTPicker1.Value = Format(DTPicker1.Value, "mm/dd/yy")
>
> and that didn't work.
> Thanks

 
Reply With Quote
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      28th Jul 2008
Explain what you mean by "wrong date" for us (that is, give us details).

Rick


"ranswrt" <(E-Mail Removed)> wrote in message
news:8E31B149-B45F-4C57-A382-(E-Mail Removed)...
> When I use DTPicker control to put a date into a cell, it puts the wrong
> date
> in. Do I need to change the number format in the cell or on the control?
> I
> tried
>
> DTPicker1.Value = Format(DTPicker1.Value, "mm/dd/yy")
>
> and that didn't work.
> Thanks


 
Reply With Quote
 
ranswrt
Guest
Posts: n/a
 
      28th Jul 2008
The control is on a userform. So I set the date to a variable then use that
to put it into a cell on the worksheet.

"Jim Thomlinson" wrote:

> Why not just set the linked cell property of the control to a cell on the
> sheet. Wht the sheet in design mode right click the control and select
> Properties. In the Linked Cell property add the cell reference. See if that
> fixes your date issue...
> --
> HTH...
>
> Jim Thomlinson
>
>
> "ranswrt" wrote:
>
> > When I use DTPicker control to put a date into a cell, it puts the wrong date
> > in. Do I need to change the number format in the cell or on the control? I
> > tried
> >
> > DTPicker1.Value = Format(DTPicker1.Value, "mm/dd/yy")
> >
> > and that didn't work.
> > Thanks

 
Reply With Quote
 
ranswrt
Guest
Posts: n/a
 
      28th Jul 2008
When I set the date to 7/28/08 the date when it is put into a cell on the
worksheet is 1/0/1900

"Rick Rothstein (MVP - VB)" wrote:

> Explain what you mean by "wrong date" for us (that is, give us details).
>
> Rick
>
>
> "ranswrt" <(E-Mail Removed)> wrote in message
> news:8E31B149-B45F-4C57-A382-(E-Mail Removed)...
> > When I use DTPicker control to put a date into a cell, it puts the wrong
> > date
> > in. Do I need to change the number format in the cell or on the control?
> > I
> > tried
> >
> > DTPicker1.Value = Format(DTPicker1.Value, "mm/dd/yy")
> >
> > and that didn't work.
> > Thanks

>
>

 
Reply With Quote
 
ranswrt
Guest
Posts: n/a
 
      28th Jul 2008
I would like the date in mm/dd/yy format if possible.

"ranswrt" wrote:

> When I use DTPicker control to put a date into a cell, it puts the wrong date
> in. Do I need to change the number format in the cell or on the control? I
> tried
>
> DTPicker1.Value = Format(DTPicker1.Value, "mm/dd/yy")
>
> and that didn't work.
> Thanks

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract number from text string based on number's format? MeatLightning Microsoft Excel Misc 16 19th Nov 2008 01:08 AM
How do I input number in Access data type=number; format=percent Help Visio! Microsoft Access Getting Started 5 26th Aug 2008 08:12 PM
DTPicker Date format ranswrt Microsoft Excel Programming 7 30th Jul 2008 06:13 AM
Number format based on number format of another cell in another workbook Rob Microsoft Excel Programming 9 9th Jan 2005 04:30 PM
Dtpicker problem, any ideas why I can't set my dtpicker control to now() Patrick Gibbons Microsoft Access Forms 2 10th Feb 2004 08:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:38 PM.