Option Explicit
Private Sub Command1_Click()
'~~~ Sample values
Dim strStart As String
Dim strEnd As String
strStart = "759"
strEnd = "1702"
'~~~ Split the hours and minutes of both times
Dim lngMin1 As Long
Dim lngMin2 As Long
Dim lngHr1 As Long
Dim lngHr2 As Long
'~~~ Minutes
lngMin1 = CLng(Right$(strStart, 2))
lngMin2 = CLng(Right$(strEnd, 2))
'~~~ Hours
lngHr1 = CLng(Mid$(strStart, 1, Len(strStart) - 2)) '~~~ will take both "759" as well as "0759"
lngHr2 = CLng(Mid$(strEnd, 1, Len(strEnd) - 2))
'~~~ Find the total minutes of each time
Dim lngTime1 As Long
Dim lngTime2 As Long
lngTime1 = (lngHr1 * 60) + lngMin1
lngTime2 = (lngHr2 * 60) + lngMin2
'~~~ Subtract the total minutes
Dim lngDiff As Long
lngDiff = lngTime2 - lngTime1
'~~~ Now we got the difference. So, divide the minutes by 60 (and take floor() of it). This will give the minutes.
'~~~ ... and by taking MOD 60, you'll get the minutes
Dim strTimeDiff As String
strTimeDiff = CStr(Fix(lngDiff / 60)) & Format(CStr(lngDiff Mod 60), "0#") '~~~ "903"
'~~~ Display the time difference
MsgBox strTimeDiff
End Sub