Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

converting text value date

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Converting Text Value to a Date

Converting Text Value to a Date

ResolvedVersion 2003

David has attended:
Access Advanced course

Converting Text Value to a Date

Hi
I have a user input form made through vb which allows users to enter data in the form and then click a button and the data populates into the worksheet. This works fine except there is a text box field for a date. When the data is populated the date format comes out as mm/dd/yyyy in the worksheet. So when a user enter 10/01/1985 in the text box field it populates into the worksheets as 01/10/1985. Is there a way of changing the format so that it populates in the uk date format dd/mm/yyyy?

RE: Converting Text Value to a Date

Hi David

Thankyou for your question

My first impression is that the format of the cells into which the date value is being entered is causing the problem.

If you select the cells in question and click on Format-Cells-Number you will see the date format options.

You should first ensure that the location is set to English(UK), not English(US) and then choose the specific format that you need.

If this doesn't solve the problem, please let me know so we can explore other options

Regards

Stephen

RE: Converting Text Value to a Date

Thanks for the quick response Stephen. I have just tried this and it is still being populated in the format mm/dd/yyyy. I wonder whether in the vb code we have to specify the format?

RE: Converting Text Value to a Date

Hi David

I have just tried to replicate your problem using the method you describe, and my dates come out in the correct format.

There are a number of VB expressions that allow dates to be formatted in a particular way, but it is difficult give you precise advice without seeing the problem first hand.

Is it possible for you to email me a copy of the workbook? My email address is stephenATstl-training.co.uk

Regards

Stephen

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Finding cells that have data restrictions

Click anywhere on the worksheet.
On the Edit menu, click Go To.
Click Special.
Click Data validation.
Click All.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.