A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hello again Adrian,
I opted out of this thread because I did not want you to become confused by different methods adopted by Andreas and myself. However, as it appears that you do not yet have a solution to your problem of writing dates from text in VBA to the worksheet I thought that I should opt back in and perform a test to establish if the method by Andreas of converting the text to dates is the problem or some other problem exists.
I have uploaded a workbook to the link below as a zipped file. Download and extract the workbook and test. Insert dates and times into the textboxes in the d/m/y format and see what result you get after clicking the "Calculate Time Difference" and it writes the dates and times back to the worksheet.
You will see that I have used the Split Function and the DateSerial function to convert the text dates to real dates. I am still dubious about the use of CDate but the method I have used performs a definite conversion based on the text date in d/m/y/ format.
Note the code to convert the time difference date to text for the time difference textbox. It is necessary to use the worksheet.text function because VBA does not work with retaining hours when the time difference is greater than 24 hours.
I have not attempted to use your method of assigning to the ListBox and then writing all to the worksheet because that is not required for this simple test.
If the test does not work then I believe there is a problem with VBA and dates when converting from text to date format and it could be applicable to different regions even though we both use d/m/y format. However, if it does work then I believe that CDate is not working as intended in your regional setup.
Link to the workbook: