|通过自定义函数以千分之一秒进行计算问题:值在万分之一秒内的计算将要完成答案:在适当的模块中插入以下代码。具有以下用户定义的功能。语法:= spectime(A1)

将下面的代码放入标准模块

Function SpecTime(txt As String)

Const DIV As Long = 86400

Dim dblValue As Double

dblValue = CInt(Right(txt, 4)) / (DIV * 10000)

dblValue = dblValue + CInt(Mid(txt, 4, 2)) / DIV

dblValue = dblValue + CInt(Left(txt, 2)) / (DIV / 60)

SpecTime= dblValue

End Function