OK, this function should work for you, but has not been thoroughly tested. It assumes that you will always have the designations h m and s in the input field, but does not assume any length of the values that precede the designations.
There may be a better way, but this does seem to work for any values that I test it with.
Public Function ConvertTime(strInput As String) As Long
Dim SearchString, SearchCharH, SearchCharM, SearchCharS As String
Dim MyPosH, MyPosM, MyPosS, intLen As Integer
Dim intHours, intMinutes, intSeconds As Integer
Dim intHlen, intMlen, intSlen As Integer
Dim intHrsSecs, intMinSecs As Integer
SearchString = strInput ' String to search in.
SearchCharH = "h" ' Search for "h".
SearchCharM = "m" ' Search for "m".
SearchCharS = "s" ' Search for "s".
MyPosH = InStr(1, SearchString, SearchCharH)
MyPosM = InStr(1, SearchString, SearchCharM)
MyPosS = InStr(1, SearchString, SearchCharS)
intHlen = MyPosH - 1
intMlen = (MyPosM - MyPosH) - 2
intSlen = (MyPosS - MyPosM) - 2
intHours = Nz(Left(SearchString, intHlen))
intMinutes = Nz(Mid(SearchString, (MyPosM - intMlen), intMlen))
intSeconds = Nz(Mid(SearchString, (MyPosS - intSlen), intSlen))
If intHours <> "" Then intHrsSecs = intHours * 3600
If intMinutes <> "" Then intMinSecs = intMinutes * 60
If Not IsNumeric(intSeconds) Then intSeconds = 0
ConvertTime = intHrsSecs + intMinSecs + intSeconds
End Function
