Excel Date Picker

sutclpa

Board Regular
Joined
Dec 21, 2006
Messages
83
Hi All,

I have been trying to insert a calander function into an excel worksheet, and have come across the Date Picker function.

So far i have placed this directly onto my worksheet and linked the object directly to a cell. The problem i am having is that when i select a date from the calander, it is placed into the cell as text which is subsequently messing with my formulas.

Is there a way to amend this so that the cell value is entered as a date?
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Sounds like you need to format your cells or colums as date format.

Highlight your range
Right click
Format cells
Choose 'date'
Select which formatting you like
 
Upvote 0
Have you looked at the Calendar control? This is usually found under the “More Tools” button on the Control Toolbox toolbar.
 
Upvote 0
Hi,

The cells are already formated as dates, however the date picker overwrites this.

Also, unfortunately i do not have the calander function installed which is why i've plumped for the date picker instead. Thanks for the link to the addin, but i am trying to avoid doing thing this way as i will have to distribute the sheet to several people when complete.
 
Upvote 0
Hi All,

I have resolved this now. In case anybody is interested, i did it by adding the following code to the VBA code associated with the object.

Private Sub DTPicker2_CloseUp()
Range("E4").Select
Selection.TextToColumns Destination:=Range("E4"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 4)
End Sub

Basically it utilises the text to columns function from excel and performs it each time a new value is selected.
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,211
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top