I have a couple of requests concerning two Time formatted Text Boxes
Both records are converted from text to the format hh:mm (see Below) when written to the worksheet as part of a command module
If AddRecord Then CurrentRow = wsDailyHours.Range("A" & wsDailyHours.Rows.Count).End(xlUp).Row + 1
determines the next available row in the worksheet (wsDailyHours)
The following lines are extracts from the Command Code and which currently write the hh:mm values to Columns E and F in the worksheet
.Cells(CurrentRow, 5).Value = CDate(Format(txtStartTime.Text, "hh:mm"))
.Cells(CurrentRow, 6).Value = CDate(Format(txtFinishTime.Text, "hh:mm"))
I am looking to create code that will firstly calculate the difference between txtFinishTime and txtStartTime in format hh:mm. This value would then be added to column G in the worksheet [.Cells(Current Row, 7).Value = .....]
Next I would like to convert the resulting value of Column G to a two decimal place value in Column H again as the record is written to the worksheet
I wish to maintain the hh:mm format in Column G
Hoping someone can assist
Both records are converted from text to the format hh:mm (see Below) when written to the worksheet as part of a command module
If AddRecord Then CurrentRow = wsDailyHours.Range("A" & wsDailyHours.Rows.Count).End(xlUp).Row + 1
determines the next available row in the worksheet (wsDailyHours)
The following lines are extracts from the Command Code and which currently write the hh:mm values to Columns E and F in the worksheet
.Cells(CurrentRow, 5).Value = CDate(Format(txtStartTime.Text, "hh:mm"))
.Cells(CurrentRow, 6).Value = CDate(Format(txtFinishTime.Text, "hh:mm"))
I am looking to create code that will firstly calculate the difference between txtFinishTime and txtStartTime in format hh:mm. This value would then be added to column G in the worksheet [.Cells(Current Row, 7).Value = .....]
Next I would like to convert the resulting value of Column G to a two decimal place value in Column H again as the record is written to the worksheet
I wish to maintain the hh:mm format in Column G
Hoping someone can assist