98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Converting Text Value to a Date
Converting Text Value to a Date
Resolved · Urgent Priority · Version 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 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
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:The Easiest and Quickest Way to use Autosum in Excel 2010Autosum is used frequently in Excel. As with almost every feature of Excel, there are more ways than one to use each feature. Below is the simplest way to use the Autosum feature. |