Hi Andreas
I really wish I could speak german
Please please follow slowly what im trying to say to you
1/ There is no special date format regional or otherwise needed - its simply UK - dd/mm/yyyy that is the regional setting/ cell format for my PC and excel - nothing complicated
2/ I do not want to do anything fancy - other than have the user fill in the relevant dates as per the userform questions - that being the date of the call and the date the incident finished only
(I dont want to touch anything regarding the 'now' date or time - that is irrelevant to this issue and it works and even gives the correct formatting!!)
The calculations on the spreadsheet in all respects work fine - EXCEPT where the date format has been reformatted from dd/mm/yyyy to mm/dd/yyyyy which then distorts the elapsed time by over one month
3/ the date format needs to be dd/mm/yyyy - approximately the same as germany!! - currently, if - as you say you enter the date as dd/mm/yyyy into the USERFORM text boxes ( as text or otherwise - ok I am aware of that !!!) excel on the worksheet - if the
day is between 01 - 10 changes the date to MM/dd/yyyy where the day is < the 10th day of the month !! and that is the problem!!!
4/ I dont understand why it is necessary to 'parsedate' anything, as the date format is a standard format ??? I do not want to run any un-nccessary functions for such a simple operation
5/ So again -PLEASE !! I need to know how to set the
.Cells(irow, 6) = frmincident.txtdatefinished.Value to be formatted as a date (dd/mm/yyyy)
so that the text or 'Value' is passed to excel as a date - simple and as you keep saying!!. The list box entry should now show the same as the worksheet entry in the format dd/mm/yyyy WITHOUT
swapping the day/month around - this has been the root problem
6/ Then when the data gets called back into the Userform by the user selecting an entry from the list box and pressing edit -
using
Me.txtdatefinished.Value = Format(Me.LstDatabase.List(Me.LstDatabase.ListIndex, 5), "dd/mm/yyyy") -
I actually think that this is working ok because what is with in the worksheet for the 'Value' comes into the List box in the same way and is the original guidance from OssieMac
the 'txtdate' and 'txtfinished' box should now show the value in the box as dd/mm/yyyy
-Please now does that make sense ?
7/ I just need to know what code to write - that is the expressions/operators to add to the above lines to get subroutine to save the .values to the spreadsheet in whatever is required - nothing to do with wanting to use text or what excel does - Im happy
that I understand what excel does when a text string appears as if it is a date
8/ The issue is on the user form not the spread sheet !! Correct?
Please please lets finish this simply without talking around how excel looks at text and dates
Regards
Adrian