A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Programming
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Error with Date Picker



 
 
Thread Tools Display Modes
  #1  
Old May 30th 12, 07:04 PM posted to microsoft.public.excel.programming
Molly Turner
external usenet poster
 
Posts: 1
Default Error with Date Picker

I created an userform in excel and placed a date picker on the form.
The date picker works fine and lets the user select the date, but
there is an issue when the information gets transferred to the
workbook. The date appears as 05/30/2012 on the date picker but when
the data is transferred to the worksheet it appears as 41059. How
can I fix this??

M
Ads
  #2  
Old May 30th 12, 07:45 PM posted to microsoft.public.excel.programming
Walter Briscoe
external usenet poster
 
Posts: 179
Default Error with Date Picker

In message
s.com> of Wed, 30 May 2012 11:04:51 in microsoft.public.excel.programmin
g, Molly Turner > writes
>I created an userform in excel and placed a date picker on the form.
>The date picker works fine and lets the user select the date, but
>there is an issue when the information gets transferred to the
>workbook. The date appears as 05/30/2012 on the date picker but when
>the data is transferred to the worksheet it appears as 41059. How
>can I fix this??


Try formatting the cell to which the date is loaded as mm/dd/yyyy.

In Excel 2003, I entered 41059 in a cell.
41059 is 41058 days since Excel's minimum date - 01/01/1900.

I then put focus on that cell.
Ctrl+1 or Format/Cells opens a Format Cells dialog.
Select the Number tab and the Custom Category.
In Type:, in place of General, enter mm/dd/yyyy.
I have an issue in a British environment. the formula bar renders it as
dd/mm/yyyy - the default date format.

Adapt to your environment.

Where do you find a date picker? It is likely to be helpful to supply
more information for your next enquiry.
--
Walter Briscoe
  #3  
Old May 30th 12, 07:52 PM posted to microsoft.public.excel.programming
Gord Dibben[_2_]
external usenet poster
 
Posts: 572
Default Error with Date Picker

Format the receiving cell as Date mm/dd/yyyy

You can probably do that in the code behind your userform but we can't
see that code.

Maybe...........

ActiveCell.Value = Format(Calendar1.Value, "mm/dd/yyyy")


Gord

On Wed, 30 May 2012 11:04:51 -0700 (PDT), Molly Turner
> wrote:

>I created an userform in excel and placed a date picker on the form.
>The date picker works fine and lets the user select the date, but
>there is an issue when the information gets transferred to the
>workbook. The date appears as 05/30/2012 on the date picker but when
>the data is transferred to the worksheet it appears as 41059. How
>can I fix this??
>
>M

  #4  
Old May 30th 12, 08:39 PM posted to microsoft.public.excel.programming
Gord Dibben[_2_]
external usenet poster
 
Posts: 572
Default Error with Date Picker

Walter

OP is most likely using the Excel default Activex Calendar Control


Gord

On Wed, 30 May 2012 19:45:02 +0100, Walter Briscoe
> wrote:

>Where do you find a date picker? It is likely to be helpful to supply
>more information for your next enquiry.

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
add date picker tab New Users to Excel 1 June 1st 09 02:15 PM
Cant set the date into a Date & Time Picker from Cell value RyanH Excel Programming 5 September 8th 08 10:43 PM
Date Time Picker : Error 35788 cosmoKen Excel Programming 1 May 10th 06 02:15 PM
date / time picker error Mark Excel Programming 0 October 3rd 05 02:51 AM
date time picker error KEvin Excel Programming 0 August 22nd 03 06:50 AM


All times are GMT +1. The time now is 01:16 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2004-2013 ExcelBanter.
The comments are property of their posters.